Row identification number generation in database direct memory access engine

ABSTRACT

Techniques provide for hardware accelerated data movement between main memory and an on-chip data movement system that comprises multiple core processors that operate on the tabular data. The tabular data is moved to or from the scratch pad memories of the core processors. While the data is in-flight, the data may be manipulated by data manipulation operations. The data movement system includes multiple data movement engines, each dedicated to moving and transforming tabular data from main memory data to a subset of the core processors. Each data movement engine is coupled to an internal memory that stores data (e.g. a bit vector) that dictates how data manipulation operations are performed on tabular data moved from a main memory to the memories of a core processor, or to and from other memories. The internal memory of each data movement engine is private to the data movement engine. Tabular data is efficiently copied between internal memories of the data movement system via a copy ring that is coupled to the internal memories of the data movement system and/or is coupled to a data movement engine. Also, a data movement engine internally broadcasts data to other data movement engines, which then transfer the data to respective core processors. Partitioning may also be performed by the hardware of the data movement system. Techniques are used to partition data “in flight”. The data movement system also generates a column of row identifiers (RIDs). A row identifier is a number treated as identifying a row or element&#39;s position within a column. Row identifiers each identifying a row in column are also generated.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is related to U.S. patent application Ser. No.15/073,905, entitled Database Tuple-Encoding-Aware Direct Memory AccessEngine For Scratchpad-Enable dMulti-Core Processors, filed on March 18thby David Brown, et al., the entire contents of which are incorporatedherein by reference, and referred to herein.

TECHNICAL FIELD

The technical field relates to data movement by hardware data movementsystem.

BACKGROUND

Database servers that execute on multi-core processors perform datamanipulation operations on large amounts of tabular data. Tabular datais data that is logically organized as rows and one or more columns,each column having a certain size, each row including each column.Logically, tabular data resides in a table-like structure, such as aspreadsheet or relational table. However, the actual physical storage ofthe tabular data may take a variety of forms. For example, in row-majorformat, tabular data may be stored as rows that are stored contiguouslywithin a memory address space, each row including each column and agiven column occupying the same number of bytes within a row. Incolumn-major format, each column may be separately stored from othercolumns as a column stored contiguously within a memory address. Unlessotherwise indicated, the term column refers to a column stored in columnmajor format, in one or more column vectors.

To perform data manipulation operations on tabular data efficiently,tabular data is moved from main memory to a memory closer to a coreprocessor, where the operations can be performed more efficiently by thecore processor. Thus, the movement of tabular data between the memorycloser to a core processor and main memory is the type of operation thatis performed frequently by database servers.

However, approaches for moving tabular data to a memory closer to thecore processor add overhead that significantly offset or eliminate anyadvantage gained by the movement of tabular data to the memory closer tothe core processor. Even direct memory access (DMA) engines capable ofoffloading the task of moving data cannot offer sufficient increase inprocessor efficiency for several reasons. Tabular data processed bydatabase operations is not organized or formatted in a way that isoptimal for a DMA engine to move.

Additionally, the memory closer to the core processor is typically smallin size. Therefore, a DMA engine will be able to move only a smallportion of data into the local memory before that memory is full andneeds to be emptied before it can be written to again. This results inthe DMA engine repeating the process multiple times and issuing aninterrupt each time the DMA moves data to the memory closer to the coreprocessor, resulting in a large number of interrupts. A large number ofinterrupts deteriorate core processor performance because every time thecore processor is interrupted, the core processor must determine thesource of the interrupt and how to handle the interrupt.

Database Tuple-Encoding-Aware Direct Memory Access Engine ForScratchpad-Enabled Multi-Core Processors describes a hardwareaccelerated data movement system that is on a chip and that efficientlymoves tabular data to multiple core processors. To perform datamanipulation operations on tabular data efficiently, the datamanipulation operations are performed in-flight while moving tabulardata to the core processors. The data movement system includes multipledata movement engines, each dedicated to moving and transforming tabulardata from main memory to a subset of the core processors. Each datamovement engine is coupled to an internal memory that storesdata/control structures (e.g. a bit vector) that dictate how datamanipulation operations are performed on tabular data moved from a mainmemory to the memories of a core processor. The internal memory of eachdata movement engine may be private to the data movement engine.

There are scenarios where a copy of the same data/control structure canbe used by multiple data movement engines. Under such scenarios, a copyof the data is needed in the internal memory of each data movementengine. A copy of the data can be moved from main memory via a DMAengine to the internal memory of each data movement engine. To avoidmultiple movements of the copies from main memory to the multipleinternal memories and thereby improve efficiency of copying data,techniques are described herein for internally copying data betweeninternal memories within a data movement system.

There are also scenarios where a copy of the same data is transferredfrom main memory to the memories of multiple core processors. If themultiple cores are served by different data movement engines, each copymay have to be transferred in separate data movements, one for each datamovement engine, each data movement entailing a transfer from mainmemory via a DMA engine. To avoid such multiple data movements andimprove efficiency of transferring data to memories of multiple coreprocessors, described herein are techniques for a data movement engineto internally broadcast data to other data movement engines, which thentransfer the data to the respective core processors.

Partitioning

Certain operations performed by database servers that execute onmulti-core processors, such as joins, aggregations and sorts, frequentlyneed to partition tabular data across computing nodes. The cost ofperforming such partitioning is a significant proportion of the overallexecution time of a query. As a result, performing the partitioning ofdata efficiently is a key for achieving high performance and scalabilityin distributed query processing. Described herein are hardwareaccelerated approaches for achieving such high performance andscalability.

Altering Row Alignment

Columns storing rows can be row aligned. When rows stored in a set ofcolumns are row aligned, the same row is stored in the same relativeposition or index in each column of the set of columns.

Row alignment enables row resolution. Row resolution refers to theoperation of identifying, for a row in a column, at which index orrelative position in another column the row resides. For example, a setof rows are stored in multiple columns, which are row aligned. For aparticular row stored at the third index or position within a column,row resolution involves recognizing the index or position of the elementin the other columns for which the same row is also the third.

Various data manipulation operations, such as a partition operation,manipulate a “source column” to generate one or more “resultantcolumns”. A resultant column may not be row aligned with the sourcecolumn. Thus, row alignment by itself cannot be relied upon to performrow resolution between the source column and any resultant column.

To illustrate, a source column may be partitioned into two resultantcolumns, such that elements in the odd ordinal position of the sourcecolumn are stored in a first resultant column and the elements in theeven ordinal position are stored in the second resultant column. Neitherthe first or second resultant column is row aligned with the sourcecolumn. For example, the fourth element in the source column and thesecond element in the second column belong to the same row, however, theindex or position of the row is different between the source column andsecond resultant column.

Because there is no row alignment between any of the first and secondresultant columns and the source column, row alignment by itself may notbe used to perform row resolution. Described herein are approaches thatenable row resolution when row alignment is lost between a source columnand resultant columns after performance of a data manipulationoperation.

BRIEF DESCRIPTION OF THE DRAWINGS

In the drawings:

FIG. 1 illustrates an example arrangement of a plurality of electroniccircuits of the data movement system according to an embodiment of thepresent invention.

FIG. 2 illustrates an example of descriptors to move data from a sourcememory location to a destination memory location according to anembodiment of the present invention.

FIG. 3 illustrates an example of descriptors for moving data stored intabular format.

FIG. 4A illustrates an example of columns that may be partitionedbetween core processors, according to an embodiment of the presentinvention.

FIG. 4B illustrates partitioning stages for partitioning data betweencore processors, according to an embodiment of the present invention.

FIG. 4C illustrates an example arrangement of a plurality of electroniccircuits of parts of a data movement system that participate inpartitioning, according to an embodiment of the present invention.

FIG. 4D illustrates an arrangement of descriptors for partitioning data,according to an embodiment of the present invention.

FIG. 4E illustrates an example of columns that may be partitionedbetween core processors, and an example of columns generated inconjunction with partitioning, according to an embodiment of the presentinvention.

FIG. 5A illustrates a buffer in scratchpad memory used for receivingrows of a column during partitioning, according to an embodiment of thepresent invention.

FIG. 5B illustrates operations performed to buffer rows of a columnreceived during partitioning, according to an embodiment of the presentinvention.

FIG. 6A illustrates pipelining of descriptors, according to anembodiment of the present invention.

FIG. 6B illustrates pipelined descriptors according to an embodiment ofthe present invention.

FIG. 7 illustrates RID columns used for row resolution afterpartitioning columns according to an embodiment of the presentinvention.

FIG. 8A illustrates descriptors used for generating RID columns used forrow resolution after partitioning according to an embodiment of thepresent invention.

FIG. 8B illustrates RID columns used for row resolution afterpartitioning columns according to an embodiment of the presentinvention.

FIG. 9A depicts various memories used by data movement engines accordingto an embodiment of the present invention.

FIG. 9B depicts RID memories used by data movement engines according toan embodiment of the present invention.

FIG. 10 depicts a copy ring interconnected to various memories used by adata movement engine according to an embodiment of the presentinvention.

FIG. 11 depicts a descriptor used to configure data movement betweenvarious memories coupled to a copy ring according to an embodiment ofthe present invention.

FIG. 12 is a flow chart depicting operations for data movement along acopy ring between various memories coupled to the copy ring according toan embodiment of the present invention.

FIG. 13 depicts a copy ring which is interconnected between various datamovement engines and which is used to broadcast data among data movementengines.

DETAILED DESCRIPTION

In the following description, for the purposes of explanation, numerousspecific details are set forth in order to provide a thoroughunderstanding of the present invention. It will be apparent, however,that the present invention may be practiced without these specificdetails. In other instances, well-known structures and devices are shownin block diagram form in order to avoid unnecessarily obscuring thepresent invention.

General Overview

The techniques described herein provide for hardware accelerated datamovement between main memory and an on-chip data movement system thatcomprises multiple core processors that operate on the tabular data. Thetabular data is moved to or from the scratch pad memories of the coreprocessors. While the data is in-flight, the data may be manipulated bydata manipulation operations.

The data movement system includes multiple data movement engines, eachdedicated to moving and transforming tabular from main memory data to asubset of the core processors. Each data movement engine is coupled toan internal memory that stores data (e.g. a bit vector) that dictateshow data manipulation operations are performed on tabular data movedfrom a main memory to the memories of a core processor. The internalmemory of each data movement engine is private to the data movementengine.

Approaches are described herein for more efficiently copying databetween internal memories of the data movement system. In addition,approaches are described herein for a data movement engine to internallybroadcast data to other data movement engines, which then transfer thedata to respective core processors. These approaches use a copy ringthat is coupled to the internal memories of the data movement systemand/or data movement engines.

Partitioning may also be performed by the hardware of the data movementsystem. Techniques for partitioning described herein partition data “inflight” without executing software programs while moving tabular datafrom a source memory to destination scratch pad memory of coreprocessors. In other words, partitioning is performed within the sameclock cycles that are used in transmitting the data to the destinationmemory location and prior to storing the tabular data at the destinationmemory location. Consequently, the tabular data stored in thedestination memory location is the tabular data resulting from thepartitioning. A core processor avoids spending additional clock cyclesto partition the tabular data.

In an embodiment, in response to a core processor pushing a particularscratch pad memory location of a “descriptor” into a register, thedescriptor is accessed by the data movement system. The descriptor mayindicate a source memory location of where tabular data is stored, andthe descriptor may also indicate a destination memory location to storethe result of a data manipulation operation. The destination memorylocation may be within a scratchpad memory that is local to the coredata processor.

The descriptor may also indicate a width of a column of tabular data anda number of rows. By describing the tabular data to be moved in terms ofnumber of rows and a width of a column of tabular data, the descriptorspecifies to the data movement system how a database column of adatabase table is formatted and stored at the source memory location.Different columns of the database table may be specified by differentdescriptors, thus the data movement system is fully aware of howdatabase tables are formatted and stored at the source memory location.Therefore, the data movement system is always optimized to accesstabular data from a source memory location and store it in a destinationmemory location, depending on how the tabular data is formatted andorganized at the source memory location.

The descriptor may also indicate one or more tabular data manipulationoperations to perform on the column of data. An example of a datamanipulation operation may be a type of filtering operation, describedherein as a gather operation. The descriptor may indicate that a gatheroperation should be performed on the tabular data.

Importantly, other types of tabular data manipulation operations thatmay be indicated include various kinds of descriptors that are used forpartitioning tabular data. According to an embodiment, partitioning isperformed in three stages. In general, these include (1) moving tabulardata into an area of memory where tabular data is staged beforepartitioning to core processors; (2) generating an identifier for eachrow of tabular data identifying a co-processor to which the row isassigned; and (3) distributing each of the rows of tabular data to thecore processor identified by the row's respective identifier. Adifferent kind of descriptor is used for each stage.

Also described herein are descriptors that may be used to generate acolumn of row identifiers (RIDs). Such a column is referred to herein asa RID column. A row identifier is a number treated as identifying a rowor element's position within a column. For example, a RID of 0 may referto the first row in a column, and 1 may refer to the second row. Asanother example, 0 may refer to the first row, 3 to the second, and 7 tothird. As yet another example, 1000 may refer to the first row in acolumn and 1001 to the second. As described below, RIDs may be used toperform row resolution.

According to an embodiment, partitioning of tabular data and generationof RIDs is performed by a data movement system that provides robustinfrastructure for supporting not only partitioning tabular data, butalso moving data and performing of various kinds of data manipulationoperations. Therefore, a detailed overview of the data movement systemis described, followed by detailed description of partitioning tabulardata.

Overview of the Data Movement System

Core Processor and DMEM

FIG. 1 illustrates an data movement system 101, an example arrangementof a data movement system. Data movement system 101 comprises aplurality of core processors 103 a, 103 g, 104 a, 104 g. Each of thecore processors 103 a, 103 g, 104 a, 104 g are connected to a localhigh-speed scratchpad memory, such as a static random-access memory(SRAM), referred to herein as DMEM (Direct Memory). In FIG. 1, coreprocessors 103 a, 103 g, 104 a, 104 g are connected to DMEM units 102 a,102 g, 105 a, 105 g, respectively. Of all the core processors, only theprocessor that is connected to a particular DMEM may directly accessthat particular DMEM. Thus, DMEM 102 a may be accessed by core processor103 a, but cannot be accessed by core processor 103 g, 104 a, 104 g.DMEM 102 g may be accessed by core processor 103 g, but not by coreprocessors 103 a, 104 a, 104 g. Likewise, DMEM 105 a may be accessed bycore processor 104 a, but not by core processors 103 a, 103 g, 104 g andDMEM 105 g may be accessed by core processor 104 g, but cannot beaccessed by core processors 103 a, 103 g, 104 a.

Direct Memory Access Complex (DMAC)

The data movement system described herein comprises three majorfunctional blocks, Direct Memory Access Complex (DMAC), Direct MemoryAccess X-Bar (DMAX) and Direct Memory Access DMEM (DMAD). The datamovement system described herein comprises only one DMAC block andseveral DMAX and DMAD blocks. The DMAC comprises several complex dataretrieval, load and manipulation engines. The DMAX blocks mainlycomprise data routing engines and the DMAD blocks mainly comprise datadecoding engines and descriptor channel blocks.

The data movement system described herein comprises one DMAD block percore, therefore the number of the DMAD blocks depend upon the number ofcores utilized in the data movement system. For example, a data movementsystem in a 32 core processor system, the number of DMAD blocks is 32.In an embodiment, several DMAD blocks may be configured to route dataand instructions to one DMAX block. Continuing with the example of the32 core processor, 8 DMAD blocks may be configured to route data andinstructions to one DMAX block, thereby resulting in 4 DMAX blocks toserve 32 DMAD blocks of 32 cores.

The data movement system described herein comprises only a single DMAC.The single DMAC processes data and instructions, routed via DMAX, fromall DMAD blocks of the data movement system. The DMAC comprises enginesthat perform complex functions and due to their complexity, require thehighest gate count, area and power relative to the engines within DMAXand DMAD blocks. Therefore, the DMAC impacts the total cost of the datamovement system more than DMAX and DMAD blocks. However, by sharing theDMAC resources across the DMAX and DMAD blocks, the cost of a DMAC tothe data movement system is amortized. Thus, the total cost of the datamovement system, in terms of gate count, area and power, issubstantially lower than alternative approaches described above.

In an embodiment, the data movement system described herein isimplemented on a single chip. Thus, for each core processor, the DMEMconnected to each of the core processors, the DMAD block for each of thecore processors, DMAX blocks and the DMAC block are all designed,implemented and configured on a single chip. A bus interconnects all thefunctional blocks of the data movement system in the chip.

Direct Memory Access DMEM (DMAD)

Each of the core processors, 103 a, 103 g, 104 a, 104 g, is connected toDMAD 106 a, 106 g, 115 a, 115 g, respectively. Each DMAD comprises agroup of electronic circuits that have been designed to receiveinstructions from the core processor connected to the particular DMAD.For example, DMAD 106 a is designed to receive instructions from coreprocessor 103 a only.

A core processor sends instructions to a DMAD by programming a set ofcommands, herein referred to as a descriptor. A descriptor describesmovement of data from one location to another location through aplurality of fields. Some of the fields in the descriptor may include adescriptor type, a source address location that indicates the sourcelocation for the tabular data to be moved from, a destination addresslocation that indicates the destination location for the tabular datafrom the source location to be copied to, the size of the column oftabular data to be operated on, the number of rows of the column oftabular data that need to be copied, one or more data manipulationoperations and wait-for event identifiers and other control flags.

Once the core processor programs the descriptor, the core processorstores the descriptor at a location in the DMEM. For example, coreprocessor 103 a upon programming the descriptor, stores it in DMEM unit102 a. Core processor 103 a then sends the descriptor to DMAD 106 a bytransmitting the memory location of the descriptor within the DMEM unit102 a onto one of the two hardware data channels of DMAD 106 a. A coreprocessor transmits the memory location of a descriptor onto a datachannel by storing the memory location into a register. In anembodiment, the register maybe designed to be a first-in-first-out orFIFO register such that the first memory location that is pushed orstored into the register will be the first memory location that is addedinto a hardware managed list of one of the two hardware data channels.

DMEM Interface Block

Each DMAD comprises a DMEM interface block that is configured to storeany data destined for the DMEM unit coupled with its DMAD, and generatea write request for the DMEM unit coupled with its DMAD to store thedata transmitted to its DMAD in the DMEM unit coupled with its DMAD. Forexample, DMAD 106 a comprises DMEM interface block 107 a. DMEM interfaceblock 107 a is a group of electronic circuits that have been designed tostore data transmitted to DMAD 106 a and destined for DMEM unit 102 a inone of the registers accessible by DMEM interface block 107 a.Additionally, the group of electronic circuits of DMEM interface block107 a have also been designed to generate a write request, for DMEM unit102 a, to store the data destined for DMEM unit 102 a. DMAD 106 g, 115a, and 115 g similarly comprise DMEM interface blocks 107 g, 109 a, 109g respectively.

The DMEM interface block is also configured to read or retrieve datafrom the DMEM unit coupled with its DMAD. The DMEM interface block maygenerate a read request, using a DMEM unit location, to read or retrievedata from the DMEM unit location. The DMEM interface block may receive aread request to read or retrieve data from a particular DMEM unitlocation and in response the DMEM interface block may read or retrievedata from the particular DMEM unit location. The DMEM interface blockmay transmit the read or retrieved data to the hardware component withinits DMAD that requested that data. The DMEM interface block may receivea write request to write or store data at a particular DMEM unitlocation and in response the DMEM interface block may write or storedata at the particular DMEM location in the DMEM unit coupled with theDMAD of the DMEM interface block. Each of DMEM interface blocks 107 a,107 g, 109 a, 109 g, depicted in FIG. 1, are designed to perform theabove operations with DMEM units 102 a, 102 g, 105 a, and 105 g,respectively.

Descriptor Channel Block of DMAD

Each DMAD comprises a Descriptor Channel Block, which is a subset ofelectronic circuits of the DMAD that are designed to determine thehardware data channel to which the descriptor will be added. In anembodiment, each DMAD may be designed to maintain two hardware datachannels, and may have two Descriptor Channel Blocks, one for each ofthe hardware data channels. For example, DMAD 106 a is designed tomaintain two hardware data channels. Descriptor Channel Blocks 108 a and108 b are the two descriptor channel blocks of DMAD 106 a. Similarly,DMAD 106 g comprises Descriptor Channel Blocks 108 g, 108 h, DMAD 115 acomprises Descriptor Channel Blocks 111 a, 111 b and DMAD 115 gcomprises Descriptor Channel Blocks 111 g, 111 h.

Each Descriptor Channel Block maintains two hardware managed lists, anactive list and a free list, per hardware data channel. In anembodiment, the hardware managed active list and free list are linkedlists. Once the core processor stores the DMEM location of thedescriptor into the FIFO register, the Descriptor Channel Block of theDMAD connected to the core processor transmits the DMEM location of thedescriptor from the FIFO register to one of the hardware data channels.In an embodiment, once the DMEM location of a descriptor is stored intoa FIFO register, the Descriptor Channel Block determines the number ofdescriptors that are assigned to be processed on that particularhardware data channel and if the number of descriptors that are assignedto be processed on that particular hardware data channel is greater thanzero, then the Descriptor Channel Block adds the new descriptoridentified by the newly pushed or stored DMEM location in the FIFOregister to the active list of that particular hardware data channel.The Descriptor Channel Block adds the new descriptor to the active listby transmitting instructions to the DMAD to write the DMEM location ofthe new descriptor to the Link Address field of the last descriptor thatwas added to that particular hardware data channel.

The Descriptor Channel Block begins processing a descriptor by storingthe DMEM location of the descriptor into a register that has beendesignated as the register from which the Descriptor Channel Block isdesigned to read from and start processing the next availabledescriptor, referred herein as the Next Descriptor to Read register. Ifthe active list is empty, then the Descriptor Channel Block stores theDMEM location from the FIFO register into the Next Descriptor to Readregister. If the active list is not empty, then the Descriptor ChannelBlock adds the descriptor, stored at the DMEM location from the FIFOregister, to the end of the active list by updating the Link Addressfield value of the descriptor previously at the end of the active listto contain the DMEM location value from the FIFO register.

In an embodiment, a register, described herein as the Last DescriptorList register, accessible by the Descriptor Channel Block comprises theDMEM location of the descriptor that is currently at the end of theactive list. The Descriptor Channel Block adds a new descriptor to theactive list by storing or writing the DMEM location from the FIFOregister as the value of the Link Address field of the descriptorcurrently at the end of the list and storing the DMEM location valuefrom the FIFO register in the Last Descriptor List register. TheDescriptor Channel Block then traverses through the active list usingthe Link Address attribute of the descriptor that is currently beingprocessed.

Once the DMEM location of a Descriptor is stored in the Next Descriptorto Read register, the Descriptor Channel Block, using the DMEM locationstored in the register, retrieves the data of the descriptor availableat that DMEM location from the DMEM. The Descriptor Channel Blocktransmits a request to read data from DMEM to the DMEM Interface Blockof the DMAD. The request to read data includes the DMEM location of thedescriptor. In an embodiment, the request to read data also specifies anumber of bytes to read. In an embodiment the number of bytes to readequals the number of bytes that make up the entire descriptor or thetotal size of the descriptor. In an embodiment, the total size of adescriptor is 16 bytes. The DMEM Interface Block retrieves data fromDMEM using the specified DMEM location and forwards the data to theDescriptor Channel Block. The Descriptor Channel Block decodes thedescriptor data including, but not limited to, determining the type ofthe descriptor. The Descriptor Channel Block determines the type of thedescriptor and processes the descriptor based at least on the type ofthe descriptor.

Descriptor Types

According to an embodiment, there are at least three types ofdescriptors, which are data descriptors, control descriptors, auxiliarydescriptors. The type of the descriptor is indicated by a descriptortype field within the descriptor data. There are multiple variationswithin each type of descriptor. Data descriptors specify how DataMovement System moves data from one memory location to another memorylocation, and the data is transformed during movement.

Control descriptors provide information for looping through one or moredescriptors more than once. Additional control descriptors include (1)descriptors that may be used to program certain configurations withinthe data movement system, referred to herein as program descriptors, (2)descriptors that may be used to control event registers in the datamovement, referred to herein as event descriptors, and (3) descriptorsthat may assist with partitioning of tabular data, referred to herein ashash and range engine (HARE) descriptors.

Auxiliary descriptors provide information that assist in the processingof another descriptor. For example, the auxiliary descriptor may be usedto provide additional control information if the size of the requiredcontrol information exceeds more than the maximum size allowed for thecontrol information.

Data descriptors, auxiliary descriptors and control descriptors thataffect registers or control state in the Direct Memory Access Complex(DMAC) 140 are forwarded to DMAC. Control descriptors that affect theregisters in a DMAD, that indicate loop mechanisms of one or moredescriptors, or other control descriptors that do not need to be sent toDMAC, or that affect registers designed to store data corresponding towait for events are further processed by the Descriptor Channel Block.

Direct Memory Access X-Bar (Cross-Bar)

Descriptors are forwarded to DMAC by forwarding the data of thedescriptors to Direct Memory Access Cross(X)-Bar (DMAX) 110 a, 110 d.DMAX comprises electronic circuits that are configured to control androute data flow from a DMAD to a DMAC and from the DMAC to the DMAD. Inan embodiment, the electronic circuits of a DMAX may be grouped into 3groups. One group of electronic circuits may be designed to transmit allcontrol information of descriptors from the DMAD to the DMAC, whileanother group of electronic circuits may be designed to transmit, fromthe DMAD to the DMAC all data corresponding to a response of a readrequest from the DMAC to the DMAD to read data from the DMEM. The thirdgroup of electronic circuits may be designed to transmit a read requestfrom DMAC to DMAD to read data from the DMEM. Additionally, the thirdgroup of electronic circuits may be designed to transmit all descriptorsreturn paths from the DMAC to the DMAD, wherein each descriptor returnpath comprises identifiers associated with a descriptor that indicatethe DMAD to which the descriptor belongs to, the descriptor channelblock within that DMAD that processed the descriptor and an identifierof that descriptor.

For example, DMAX 110 a comprises an arbitration unit, such as thearbitration unit 112 a and a FIFO register 112 b for transmitting datafrom DMAD 106 a to DMAC 140. In an embodiment, data includes controlinformation of a descriptor which may be used by the arbitration unit112 a in selecting one of the input data paths and transmitting dataincluding the control information into the FIFO register 112 b.Similarly, DMAX 110 a comprises FIFO register 114 b and routing unit 114a to transmit data from the DMAC to the DMAD. In an embodiment, datatransmitted from the DMAC may comprise control information such thatrouting unit 114 a selects the data path for the target DMAD to transmitthe data. DMAX 110 a also comprises another arbitration unit 113 a and aFIFO register 113 b for transmitting data to be copied from DMEM to anexternal storage memory.

DMAX 110 d comprises arbitration units 112 g and 113 g and routing unit114 g that provide the same functionality and perform the same functionsas arbitration units 112 a and 113 a and routing unit 114 a,respectively. DMAX 110 d also comprises FIFO registers 112 h, 113 h and114 h that provide the same functionality and perform the same functionsas 112 b, 113 b, 114 b respectively.

Direct Memory Access Complex (DMAC)—Write Descriptor Parser

DMAC 140 comprises a write descriptor arbitration unit 120 a, and theoutput of the write descriptor arbitration unit 120 a is stored in thewrite descriptor parser logic block 120 b. Write descriptor parser logicblock 120 b comprises one or more registers. Electronic circuits ofwrite descriptor parser logic block 120 b are designed to accumulatedescriptor data and control information transmitted from a DMAX. In anembodiment, descriptor data from the DMAX may be transmitted infragments, and electronic circuits of write descriptor parser logicblock 120 b may accumulate the various descriptor fields and reassemblethe descriptor fields to form the complete descriptor data. Writedescriptor parser logic block 120 b determines the descriptor type ofthe descriptor and performs operations based on the descriptor type andthe control information provided by the originating DMAD.

In response to determining that the descriptor is a data descriptor andin particular a write descriptor, write descriptor parser logic block120 b may modify the source address specified in the descriptor datausing a source counter value provided by the originating DMAD.Additionally, write descriptor parser logic block 120 b may also modifythe destination address using a destination counter value provided bythe originating DMAD. Write descriptor parser logic block 120 b alsotransmits a data movement operation and the descriptor data to anappropriate data movement engine such as a DMEM load engine.

If the descriptor type is an auxiliary type descriptor, then writedescriptor parser logic block 120 b may update a local auxiliary dataholding register and return the descriptor back to the originating DMAD.If the descriptor type is a program or control type descriptor, thenwrite descriptor parser logic block 120 b may store DMAC configurationdata specified within the descriptor in the DMAC configuration registerspecified in the descriptor, and return the descriptor back to theoriginating DMAD.

Direct Memory Access Complex (DMAC)—Read Descriptor Parser

DMAC 140 also comprises a read descriptor arbitration unit 121 a, andthe output of the read descriptor arbitration unit 121 a is readdescriptor parser logic block 121 b. Read descriptor parser logic block121 b comprises one or more registers. Electronic circuits of readdescriptor parser logic block 121 b are designed to accumulatedescriptor data and control information transmitted from a DMAX. In anembodiment, descriptor data from a DMAX may be transmitted in fragments,and electronic circuits of read descriptor parser logic block 121 b mayaccumulate the various descriptor fields and reassemble the descriptorfields to form the complete descriptor data. Read descriptor parserlogic block 121 b determines the descriptor type of the descriptor andperforms operations based on the descriptor type and the controlinformation provided by the origination DMAD.

In response to determining that the descriptor is a data descriptor andin particular a read descriptor, read descriptor parser logic block 121b may modify the source address specified in the descriptor data using asource counter value provided by the originating DMAD. Additionally,read descriptor parser logic block 121 b may also modify the destinationaddress using a destination counter value provided by the originatingDMAD. Read descriptor parser logic block 121 b also transmits a datamovement operation and the descriptor data to an appropriate datamovement engine such as a DDR load engine.

Similar to write descriptor parser logic block 120 b, if the descriptortype is an auxiliary type descriptor, then read descriptor parser logicblock 121 b may update a local auxiliary data holding register andreturn the descriptor back to the originating DMAD. If the descriptortype is a program or control type descriptor, then read descriptorparser logic block 121 b may store DMAC configuration data specifiedwithin the descriptor in the DMAC configuration register specified inthe descriptor, and return the descriptor back to the originating DMAD.

Direct Memory Access Complex (DMAC)—Data Movement Engines

DMAC 140 comprises data movement engines 130 a, 130 b, 130 c, 130 d.Each of the data movement engines 130 a, 130 b, 130 c, 130 d, compriseone or more DMEM load engines and one or more DDR load engines. Each ofthe data movement engines 130 a, 130 b, 130 c, 130 d also comprise oneor more DMEM store engine and one or more DDR store engines. Each datamovement engine receives operations from write descriptor parser logicblock 120 b, and read descriptor parser logic block 121 b. Data movementengines 130 a, 130 b, 130 c, 130 d execute these operations by copyingdata from the specified source memory and storing data in the specifieddestination memory. Each data movement engine also uses controlinformation provided by the descriptor parser logic block to theirexecute operations.

Data movement engines 130 a, 130 b, 130 c, 130 d generate read requeststo the specified source memory. Data movement engines 130 a, 130 b, 130c, 130 d accumulate data transmitted to the data movement engine inresponse to the read request, and then generate write requests to thespecified destination memory. In an embodiment, a buffering process isimplemented such that data transmitted to data movement engines may bestored in a register block accessible by the data movement engines. Datamovement engines begin processing data transmitted in response to theread request without waiting for the requested data to be available.

Electronic circuits of system bus interface master block 123 aredesigned to the receive read and write requests from the data movementengines 130 a, 130 b, 130 c, 130 d and translate them into system businterface read requests and system bus interface write requests formemory units external to the data movement system, such as main memoryor another memory unit. Electronic circuits of system bus interfacemaster block 123 transmits data it receives in response to system businterface read requests to the data movement engine that transmitted theread request. In an embodiment the system bus interface is AXI (AdvancedExtensible Interface) and system bus interface master block 123 is anAXI master block.

Descriptor return block 125 is designed to return descriptors processedby write descriptor parser logic block 120 b, read descriptor parserlogic block 121 b, and data movement engines 130 a, 130 b, 130 c, 130 d,to their originating DMAD.

DMS memory 150 comprises memory that various components of DMAC 140 mayread from or write to. In general, DMS memory 150 is used to store dataused by or generated by operations performed by the DMAC 140.

Supplemental Operation Engines 126 is representative of blocks of logic,each block performing a specific kind of operation on columns stored inDMS memory 150. For example, Supplemental Operation Engines 126 mayinclude a partition engine that partitions tuples stored in one or morecolumns stored in DMS memory 150 among core processors in the datamovement system. Such partitioning may include generating for each tuplean identifier identifying a co-processor to which the tuple is assignedby partitioning.

In addition, Supplemental Operation Engines 126 may include a hashengine. The hash engine generates hash values for one or more columnsstored in DMS memory 150. Another example of an engine that may beincluded is a copy engine. The copy engine copies data between memorylocations within DMS memory 150.

Moving Data and Performing Data Manipulation Operations UsingDescriptors

FIG. 2 illustrates an example method of moving data from a source memorylocation to a destination memory location using descriptors. FIG. 2comprises three descriptors, 201 a, 202 a, 203 a. Elements 201 b, 202 band 203 b each correspond to operations performed for descriptors 201 a,202 a, 203 a, respectively. The purposes of these elements is depict theorder of operations performed for descriptors 201 a, 202 a, 203 a.

FIG. 2 depicts a movement of ten thousand rows of data from a sourcememory location to a target memory location. In this example the sourcememory location is a double data rate synchronous dynamic random-accessmemory (DDR) and the target memory location is the DMEM connected to thecore processor that programmed the descriptor, 102 a and 103 arespectively. In the example depicted in FIG. 2, descriptors 201 a, 202a, 203 a are programmed by core processor 103 a.

Decoding Descriptor Data

Descriptors 201 a and 202 a are data descriptors. The descriptor typefield of the descriptors indicates that descriptors 201 a and 202 a aredata descriptors. In an embodiment, binary numbers may be used to depicteach descriptor type and direction in which the data is to be moved. Forexample, binary number 0000 may be encoded in the electronic circuits ofthe descriptor channel block of the DMAD that is processing thedescriptors to represent data movement from DDR memory to DMEM memory orDMEM. Similarly, data movement from DMEM to DDR memory may berepresented by binary number 0001. For descriptors 201 a and 202 a, datais to be moved from DDR memory to DMS memory or DMEM memory. Therefore,descriptor type field of descriptor 201 a, 202 a indicate theappropriate field value. The value of the “Desc Type” field shown inFIGS. 201a and 202a is only for providing a clear illustrative example.

The core processor determines the source location of the source dataalong with the destination location of where the data is to betransmitted. The core processor also determines the number of rows thatare to be processed at the source data location by a descriptor. In anembodiment, the core processor may be configured with a maximum numberof rows that a descriptor is allowed to process. Such thresholdlimitation may be dynamically determined based on the size of DMEM orthe available storage space in DMEM.

In FIG. 2, since the total number of rows of data that are to beprocessed is at least ten thousand rows, the core processor alsoprograms a control descriptor that allows a DMAD to utilize the samedescriptor numerous times. In other words the control descriptor allowselectronic circuits of the DMAD to implement a loop mechanism until somecondition within the control descriptor is not satisfied. Controldescriptors that allow the DMAD to implement such a loop mechanism willbe referred to herein as loop descriptors.

In an embodiment, a core processor may also be configured to utilizemultiple buffers in the DMEM to store data from the source datalocation. Utilization of multiple buffers allows for the core processorto access the data stored in the DMEM faster and consequently processthat data faster than using a single buffer because it allows the coreprocessor to access data stored in one buffer while the data movementsystem is moving or storing data in the other buffers. The flexibilityof specifying different destination memory locations in differentdescriptors allows for the utilization of multiple buffers.

As described herein, a buffer is said to be associated with a descriptorif the destination memory location specified in the descriptor is thestarting memory location of the buffer. Each descriptor may representonly a fraction of the total number of rows of a column of tabular datathat is being moved into a DMEM unit. Thus the buffer associated with aparticular descriptor stores the fraction of the total number of rows ofthe column of tabular data and the core processor may begin processingthe rows stored in the buffer without waiting for remaining number ofrows of the column of tabular data being moved or stored into theirrespective buffers.

Additionally, the overhead costs from interrupt routines and interrupthandlers in switching control between the hardware components of thedata movement system and the software executing on the core processormay be reduced by utilizing wait-for-events. The core processor may beconfigured to assign a particular event to a particular buffer in theDMEM and the values of the particular event will determine whether thehardware components of the data movement system will have access to theparticular buffer or whether the software executing on the coreprocessor will have access to the particular buffer.

In FIG. 2, descriptor 201 a is assigned Event0. Based on theconfiguration, core processor 103 a may either set Event0 to a value of1 or 0 in order to allow the hardware components of the DMAD to processthe descriptor. For example, if the electronic circuits of the DMAD 106a have been designed to begin the processing of the descriptor only ifEvent0 is set to be zero, then core processor 103 a will set the Event0value to 0 after core processor 103 a programs the descriptor. Coreprocessor 103 a does not access that particular buffer until the valueof Event0 is set to one. DMAD 106 a will set the value of Event0 to 1when the Buffer0 201 b is full.

In FIG. 2, within the DMEM unit 102 a, the data is being stored in twobuffers, one at address 0×0000 and another at address 0×2000. Asdescribed above, using at least two buffers enables faster processing ofdata. Once the DMAD 106 a and other hardware components of data movementsystem begin processing descriptor 201 a, data associated with thatdescriptor will be stored in Buffer0 at address 0×0000 of DMEM unit 102a. Once Buffer0 has been filled with data, DMAD 106 a will set theEvent0 value to 1, which will indicate to core processor 103 a thatBuffer0 is ready to be accessed and data in Buffer0 is ready to beprocessed. After the processing of descriptor 201 a is completed thefirst time, DMAD 106 a and other hardware components of the datamovement system will begin processing descriptor 202 a. While thehardware components of the data movement system begin processingdescriptor 202 a, core processor 103 a will be processing data fromBuffer0. Therefore, using two data buffers allows for processing datarecords on a subset of data records without waiting for the entire setof data records to be retrieved first. Thus, reducing processing timeand increasing processing speed.

In FIG. 2, descriptor 201 a will be the first descriptor to be pushed onto one of the two hardware data channels of DMAD 106 a and it will bethe first descriptor among descriptors 201 a, 202 a, 203 a to beprocessed. Descriptor 202 a will be processed after descriptor 201 a hasbegun processing and then descriptor 203 a will be the last descriptoramong the three descriptors to be processed, and descriptor 203 a willbe processed after descriptor 202 a has begun processing. The coreprocessor stores a descriptor in DMEM after programming the descriptorand in FIG. 2 core processor 103 a stores descriptor 201 a at address0×5000, descriptor 202 a at address 0×5010 and descriptor 203 a ataddress 0×5020 of DMEM or DMEM unit 102 a.

In FIG. 2, the “Src Addr” of descriptors 201 a and 202 a indicates thestarting location of the column of data within the source memory wherethe tabular data is stored. “Dest Addr” of descriptors 201 a and 202 aindicates the location in DMEM where the data from the source memorywill be stored. “Column Width” indicates the size of the data in thecolumn of data in bytes and “Rows” indicates the number of rows thatwill be processed each time the data movement system is processing thedescriptor 201 a or 202 a. A descriptor may comprise a “Src Auto IncAllow” field, wherein the “Src Auto Inc Allow” field indicates to adescriptor parser logic block within the DMAC to modify the sourceaddress based on values of one or more other fields within thedescriptor. In an embodiment, the one or more other fields within thedescriptor include, the “Counter Inc” field, the “Column Width” fieldand the “Rows” field of the descriptor. The descriptor parser logicblock may modify the source address specified in the descriptor usingthe source address specified in the descriptor as a starting point or abase source address and adding an offset value to the base sourceaddress, wherein the offset value is determined by the descriptor parserlogic block based on the values of the source counter, the width of thecolumn of tabular data that is being moved or copied from the sourceaddress specified in the descriptor and the number of rows of the columnof tabular data that is being moved or copied from the source addressspecified in the descriptor.

As described above, the “Column Width” field of the descriptor specifiesthe width of the column of the tabular data and the “Rows” field of thedescriptor specifies the number of rows of the column of tabular data.The value of the source counter may be read or retrieved from a registercomprising the source counter. In some embodiments, the “Counter Inc”field of a descriptor specifies the register that comprises the sourcecounter value. In some embodiments, the “Counter Inc” field indicatesthat the counter value that should be considered or used is the sourcecounter value and the descriptor channel block is configured to retrievethe value stored in a particular register that comprises the sourcecounter value. In some embodiments, the descriptor channel block isdesigned to retrieve a source counter value from a particular registerthat has been designated to store source counter value.

The value of the“Src Addr Inc”field determines whether or not a counterspecified by the “Counter Inc” field should be incremented. In anembodiment, if the “Src Addr Inc” field is set then the counterspecified by the “Counter Inc” field is incremented by a descriptorchannel block processing the descriptor, and if the “Src Addr Inc” fieldis not set then the counter specified by the “Counter Inc” field is notincremented. In an embodiment, the descriptor channel block that isprocessing the descriptor increments the value of the counter specifiedby the “Counter Inc” field of a source counter associated with adescriptor channel block by the descriptor channel block.

In FIG. 2, the “Counter Inc” field of descriptor 201 a specifies thatthe counter is the source counter of the descriptor channel blockprocessing descriptor 201 a, which in FIG. 2, as described above, isdescriptor channel block 108 a. The “Src Addr Inc” field of descriptor201 a triggers the incrementing of the counter value specified by the“Counter Inc” field by the descriptor channel block 108 a. Thedescriptor channel block 108 a increments the value of the counterspecified by the “Counter Inc” field after the descriptor channel blockhas transmitted the control information of descriptor 201 a to the DMAXassociated with the DMAD of the descriptor channel block 108 a.

“Link Addr” field helps the electronic circuits within a descriptorchannel block of a DMAD maintain a variety of data structure inhardware. “Link Addr” field identifies the DMEM location where the nextdescriptor that the descriptor channel block must process is stored.Additionally the “Link Addr” field is not programmed by the software,instead the electronic circuits of the descriptor channel block, asdescribed below, will determine the memory location of the nextdescriptor that should be processed and store the value of that memorylocation in the “Link Addr” field.

Loop address field of a control descriptor, specifically a loopdescriptor, allows the electronic circuits within a descriptor channelblock of a DMAD to implement the loop mechanism. In FIG. 2 the “LoopAddr” field of descriptor 203 a contains the memory address value ofdescriptor 201 a, thereby causing the descriptor channel block of theDMAD to reprocess descriptor 201 a. After reprocessing descriptor 201 a,the descriptor channel block of the DMAD will process the descriptor ofthe memory address stored in the “Link Addr” field of descriptor 201 a,which means the descriptor channel block will reprocess descriptor 202a. Thus, the descriptor channel block will continue to reprocess all thedescriptors until the loop condition is satisfied. The loop condition indescriptor 203 a is specified by “Iteration Count”. In FIG. 2 the loopcondition is satisfied when the iteration count equals zero.

A descriptor channel block stores the iteration count specified in aloop descriptor in a particular register designated for storingiteration count values. Each time the descriptor channel block processesthe loop descriptor, the descriptor channel block reads or retrieves theiteration count value from the particular register and determineswhether it is zero or not. If the iteration count value is not zero,then the descriptor channel block processes the loop descriptor,decrements the iteration count value in the particular register by one,and, as described above, reprocesses all the descriptors linked with theloop descriptor. In FIG. 2, descriptor channel block 108 a stores theiteration count value of descriptor 203 a in a register and every timedescriptor channel block 108 a processes descriptor 203 a, descriptorchannel block 108 a retrieves the iteration count value stored in theregister and determines whether the iteration count value is zero ornot. If the iteration count value is not zero, then descriptor channelblock 108 a processes descriptor 203 a, decrements the iteration countvalue in the register, and begins reprocessing descriptor 201 a.Therefore, each descriptor in FIG. 2 will be processed 5 times.

Processing of Descriptors by DMAD

Once the descriptors 201 a, 202 a, 203 a are programmed and stored inDMEM at addresses 0×5000, 0×5010 and 0×5020, respectively, coreprocessor 103 a pushes the DMEM addresses of descriptors 201 a, 202 a,203 a into a FIFO register accessible by DMAD 106 a. In an embodiment acore processor also indicates a particular hardware data channel of adescriptor channel block of the DMAD that a descriptor should be pushedonto. The descriptor channel block of the DMAD will either add thedescriptors to an existing list maintained by the descriptor channelblock or build a new list. In building or adding to the list, thedescriptor channel block of the DMAD will write the second memoryaddress pushed on to the FIFO register to the descriptor's link addressfield of the first descriptor put on the list.

For example, in FIG. 2, memory addresses of descriptors 201 a, 202 a,203 a are pushed on to a FIFO register accessible by core processor 103a and DMAD 106 a. The memory address of descriptor 201 a is pushed infirst, then the memory address of 202 a is pushed in, and then thememory address of 203 a is pushed in. As described above, eachdescriptor channel block of a DMAD maintains two lists per hardware datachannel, an active list and a free list. Descriptor channel block 108 adetermines whether the active list of the hardware data channel ontowhich the memory addresses of descriptors 201 a, 202 a, 203 a werepushed is empty. In an embodiment, a descriptor channel block maydetermine whether a list is empty based on a counter associated with thelist. Descriptor channel block 108 a determines whether the active listis empty based on whether a counter associated with that active list iszero.

The descriptor channel block 108 a adds to the active list by writing orcopying the memory address of descriptor 202 a into the link addressfield of descriptor 201 a and the memory address of descriptor 203 ainto the link address field of descriptor 202 a. If the active list ofthe hardware data channel controlled by descriptor channel block 108 ais not empty, then descriptor channel block 108 a writes or copies thememory address of descriptor 201 a into the link address field of thelast descriptor that was pushed onto that particular hardware datachannel, before descriptor 201 a. If the active list of the hardwaredata channel is empty, then descriptor channel block 108 a copies thememory address of descriptor 201 a from the FIFO register to a registerdesignated to store the next descriptor that will be processed.

Descriptor channel block 108 a retrieves the descriptor data ofdescriptor 201 a from the DMEM using the memory address of descriptor201 a. Descriptor channel block 108 a determines whether a waitcondition needs to be satisfied by checking the WAIT field of thedescriptor. In FIG. 2, a WAIT condition is required to be satisfied andis controlled by the value of Event0. Descriptor channel block 108 adetermines whether the wait condition is satisfied by determining thevalue of Event0. In an embodiment, a descriptor channel block maydetermine the value of an event by checking a register comprising valuesof all events that the descriptor channel block may use or is programmedto use. A WAIT condition is satisfied if the event specified by the WAITfield is at the specified WAIT value. Once, the WAIT condition issatisfied, a descriptor channel block does not have to wait any longerto process the descriptor.

In response to determining that the WAIT condition is satisfied,descriptor channel block 108 a continues with the processing of thedescriptor and determines the type of the descriptor. In an embodiment,the descriptor channel block determines the type of the descriptor basedon an encoded value in the “Desc Type” field. In FIG. 2, descriptor 201a is a read descriptor where the source memory is the DDR memory and thedestination memory is the DMEM local to core processor 103 a or DMEMunit 102 a. Descriptor channel block 108 a transmits the controlinformation of descriptor 201 a, including the value for the “Src AutoInc Allow” field, the source counter value, since the “Src Auto IncAllow” field value is set, and any other information that may be neededto perform any of the operations specified in the descriptor to the readdescriptor interface of DMAD 106 a. In an embodiment, descriptor channelblock 108 a may transmit fragments of the control information of adescriptor and any other data needed to perform any of the otheroperations specified in the descriptor to the read descriptor interfaceof DMAD 106 a. The size of each of the fragments depends on the width ofthe bus interface connecting descriptor channel block 108 a with theread descriptor interface of DMAD 106 a. Descriptor channel block 108 aalso determines whether the source address specified in the descriptorneeds to be adjusted or modified based on the “Src Auto Inc Allow”field.

A descriptor channel block may use one or more values of the fields ofthe descriptor to determine whether or not the source address needs tobe automatically adjusted or modified. In FIG. 2 descriptor channelblock 108 a determines that the source address needs to be automaticallyadjusted or modified based on the value of the “Src Auto Inc Allow”field. Descriptor channel block 108 a also determines whether the valueof the counter specified in the “Counter Inc” field should beincremented based on the value of the “Src Addr Inc” field. The counterspecified by the “Counter Inc” field of descriptor 201 a is the “src”counter. Thus, descriptor channel block 108 a also transmits to the readinterface of DMAD 106 a, the counter value of the “src” counter. Eachhardware data channel is associated with a particular counter used inadjusting or modifying a source address, which is stored in a registerand a managed by the descriptor channel block controlling the hardwaredata channel. The “src” counter in example of FIG. 2 is the counterassociated with the hardware data channel controlled by descriptorchannel block 108 a. In FIG. 2, the “src” counter value is zero thefirst time it is transmitted. Descriptor channel block 108 a, aftertransmitting the value of the “src” counter to the read descriptorinterface of DMAD 106 a, increments the value of “src” counter by 1.

A descriptor channel block is also associated with a destination countervalue. The destination counter value is incremented in a similar manneras the source counter value, except that the value of the “Dest AddrInc” field determines whether the destination counter will beincremented and the value of the “Dest Auto Inc Allow” field determineswhether the destination address specified in the descriptor should bemodified by an offset value. The “Counter Inc” field will specify orindicate the destination counter associated with the descriptor channelblock.

Processing of Descriptor by DMAX

Descriptor 201 a data is transmitted to the arbitration unit 112 a andthen stored in the FIFO register 112 b. FIFO register 112 b thentransmits the data to read descriptor parser logic block 121 b and theninto a register within the read descriptor parser logic block 121 b. Inan embodiment, if descriptor data is transmitted in fragments, then adescriptor parser logic block reassembles the descriptor data.

Processing of Descriptor by DMAC

Descriptor read descriptor parser logic block 121 b determines whetherthe source address specified in the descriptor data should be adjustedbased on a value corresponding to an auto increment of source addressfield. In FIG. 2, “Src Auto Inc Allow” is such a field and based on thevalue of that field, read descriptor parser logic block 121 b determinesthat the source address should be automatically adjusted or modified. Inan embodiment, source address may be automatically adjusted or modifiedaccording to the following formula:New Source Address=source address+source address countervalue*rows*column width (size in bytes)

The source address above is the source address transmitted in thedescriptor data. The counter value is the value of the counter that wastransmitted along with the descriptor data, which in example of FIG. 2is zero. The rows are the number of rows specified in the descriptordata and column width is the size of the column in bits. Therefore,plugging corresponding values into the above formula results in:

=0×0 0000 0000+0*1000*8

=0×0 0000 0000

The New Source Address above is the same as the source address specifiedin the descriptor data since the value of the counter that helpsdetermine the offset from the source address is zero. This is anaccurate result because descriptor 201 a represents the first 1000 rowsof the 10,000 rows of data that are required to be processed in FIG. 2,therefore, an offset from the initially specified address is notrequired. Read descriptor parser logic block 121 b transmits the controlinformation of descriptor 201 a and any other data required to performany operations specified in descriptor 201 a to an appropriate loadengine block of data movement engine 130 a based on the direction of thedata movement indicated in the descriptor type field of a descriptor. InFIG. 2, the descriptor type field, “Desc Type”, indicates that the datamovement is from DDR to DMEM, therefore, the appropriate load engineblock to which the control information of descriptor 201 a and any otherdata required to perform any operations specified in descriptor 201 a istransmitted is a DDR load engine block of data movement engine 130 a.

The appropriate load engine block of a data movement engine determinesthe type of the source memory specified in the descriptor data andgenerates a read request based on the type of source memory. In FIG. 2,in response to determining that the source memory is DDR memory, the DDRload engine block of data movement engine 130 a generates a read requestto the system bus interface master block 123. In an embodiment, theamount of data requested in a read request may have a maximum threshold,and the number of read requests generated by an appropriate load engineblock of a data movement engine may be based partly on the maximumthreshold on the amount data that can be requested within one readrequest and the amount of data that a descriptor is requesting for initeration of its processing. For example, if the maximum threshold is256 bytes, then the appropriate load engine block of data movementengine 130 a will generate 32 read requests to satisfy the 8000 bytes ofdata requested by descriptor 201 a.

System bus interface master block 123 accepts the read requests andtransmits the read requests to the appropriate memory unit interfacethat can accept the requests. In response to the requests, datacorresponding to the read requests are returned to the system businterface master block 123. Data corresponding to the read requests istransmitted from the system bus interface master block 123 to theappropriate load engine of the data movement engine that initiated theread requests. The appropriate load engine of the data movement enginetransmits the data to an appropriate storage block unit within the datamovement engine based on the destination memory unit indicated in thedescriptor type field of the descriptor. In the example of FIG. 2,system bus interface master block 123 transmits the data to the DDR loadengine of data movement engine 130 a, and the DDR load engine transmitsthe data to the DMEM storage block unit within data movement engine 130a. DMEM storage block unit within data movement engine 130 a transmitsthe data and control information of the descriptor to FIFO register 114b within DMAX 110 a along with the destination address specified indescriptor 201 a and an identifier associated with core processor 103 a.FIFO register 114 b identifies, using the core processor identifierincluded in the control information transmitted to FIFO register 114 bfrom the DMEM storage block unit, DMEM unit 102 a as the DMEM unitassociated with the core processor identifier, and transmits data fromwrite interface 114 a to DMEM unit 102 a via DMEM interface block 107 awithin DMAD 106 a to store the data at the destination address specifiedin the descriptor.

Transmission of Tabular Data to Destination Memory

After transmitting data to FIFO register 114 b, the DMEM store unit indata movement engine 130 a transmits the descriptor return path ofdescriptor 201 a to descriptor return block in DMAC 140, whereindescriptor return path of a descriptor includes a DMAD identifier, adescriptor channel block identifier and a descriptor identifierassociated with the descriptor. Descriptor return block in DMAC 140transmits the descriptor return path of descriptor 201 a to a returneddescriptor FIFO register within FIFO register 114 b. FIFO register 114 btransmits the descriptor return path of descriptor 201 a to descriptorchannel block 108 a in DMAD 106 a. Descriptor channel block 108 a setsthe notify event to signal to the core processor 103 a that datarequested by descriptor 201 a is ready to be processed. In FIG. 2, thenotify event is identified by the “Notify” field of descriptor 201 a,and is Event0.

Descriptor Return Path

Prior to processing a descriptor, a descriptor channel block determineswhether there are any free or available descriptor identifiers that canbe associated with the descriptor. If the descriptor channel blockdetermines that no descriptor identifiers are available, then thedescriptor channel block waits until a descriptor identifier isavailable. In an embodiment, one or more registers comprise all freedescriptor identifiers. Once a descriptor identifier is available, thedescriptor channel block begins processing a descriptor and associatesthe available descriptor identifier with the descriptor. In someembodiments the descriptor identifier may be a 2 bit identifier,therefore, each descriptor channel block within a DMAD may process andsupport up to four different descriptors at a time. The descriptoridentifier associated with the descriptor is included within the controlinformation of that descriptor and transmitted to the DMAC.

Additionally, the descriptor channel block includes its own identifierwithin the control information transmitted to the DMAC. In someembodiments, the descriptor channel block identifier is a one bitidentifier. For example a value of zero in that bit identifies onedescriptor channel block of a DMAD and a value of one in that bitidentifies the other descriptor channel block of the DMAD. Descriptorchannel block also includes a DMAD identifier associated with the DMADwithin which the descriptor channel block resides. In some embodiments,the DMAD identifier may be 5 bits.

The descriptor identifier, the descriptor channel block identifier andthe DMAD identifier is collectively referred to herein as the descriptorreturn path. In some embodiments, the identifier associated with thedescriptor may be a sequence of bits, and different subsets of thesequence of bits correspond to the descriptor identifier, the descriptorchannel block identifier, and the DMAD identifier. For example, theidentifier associated with the descriptor may be a sequence of 8 bits,where the five most significant bits correspond to the DMAD identifier,the next bit corresponds to the descriptor channel block identifier andthe least significant two bits correspond to the descriptor identifier.

Once the DMAC completes processing all the operations necessary tosatisfy the data requests specified in a descriptor, then the DMACconfigures a descriptor return path for that descriptor. The descriptorreturn path of that descriptor includes the DMAD identifier, thedescriptor channel block identifier and the descriptor identifierassociated with the descriptor and included in the control informationof that descriptor. The DMAC transmits the descriptor return to itsoriginating DMAD via the DMAX associated with the originating DMAD. Arouting unit within the DMAX associated with the originating DMADdetermines the originating DMAD based on the DMAD identifier included inthe descriptor return path and transmits the descriptor return path tothe descriptor return interface block of the originating DMAD.

The descriptor return interface block of the originating DMAD determinesthe descriptor channel block that processed that descriptor based on thedescriptor channel block identifier and transmits the descriptor returnpath to the descriptor channel block that processed that descriptor. Thedescriptor channel block that processed that descriptor determines,based on the descriptor identifier, the DMEM location of thatdescriptor. In an embodiment, the association between a DMEM location ofa descriptor and the descriptor identifier associated with thedescriptor is stored in a lookup table by the descriptor channel blockthat processed the descriptor.

Descriptor channel block 108 a determines whether the loop count iszero, and if the loop count is zero, the descriptor channel block 108 adetermines whether descriptor 201 a will be added to the free list ofthe hardware data channel controlled by descriptor channel block 108 a.In an embodiment, the descriptor channel block 108 a may determinewhether or not a descriptor will be added to the free list based onwhether data of the descriptor indicates that the particular descriptorshould be added to the free list. For example, there may be a free pushfield within the data of the descriptor that may have a value of 1 or 0to indicate that the particular descriptor should be added to the freelist. Additionally, if the loop count is zero, then the descriptorchannel block 108 a also decrements the active count value of thatchannel by 1. If the loop count is not zero, then descriptor channelblock 108 a terminates the processing of descriptor 201 a for thisparticular iteration.

Traversing the Hardware Managed List

After descriptor channel block 108 a transmits descriptor 201 a data toarbitration unit 112 a, descriptor channel block 108 a determines DMEMunit 102 a address of the next descriptor within the active list of thedescriptor channel block based on the link address field within the dataof descriptor 201 a. Descriptor channel block 108 a retrieves data ofdescriptor 202 a from DMEM 102 a address 0×5010. Descriptor channelblock 108 a processes descriptor 202 a similarly to how descriptor 201 ais processed and transmits descriptor 202 a data to arbitration unit 112a along with the “src” counter value, as indicated by descriptor 202 a.The “src” counter value, when transmitted with the data of 202 a, is 1.After descriptor 202 a data is transmitted to arbitration unit 112 a,descriptor channel block 108 a increments “src” counter value by 1.Thus, the “src” counter value is now 2.

Descriptor 202 a control information and the “src” counter valuetransmitted along with descriptor 202 a data is stored in FIFO register112 b and then transmitted to read descriptor arbitration unit 121 a andstored in read descriptor parser logic block 121 b. Read descriptorparser logic block 121 b again determines, similar to the way describedabove, that the source address specified in the descriptor data shouldbe adjusted or auto incremented. Read descriptor parser logic block mayadjust or modify the source address according to the same formuladescribed above, which is:New Source Address=source address+source counter value*rows*column width(size in bytes)

The source address above is the source address transmitted in descriptor202 a data. The counter value is the value of the counter that wastransmitted along with descriptor 202 a data, which is 1. The rows arethe number of rows specified in descriptor 202 a data and column widthis the size of the column in bytes. Therefore, plugging thecorresponding values into the above formula results in:

=0×0 0000 0000+1*1000*8

=0×0 0000 1F40

The New Source Address is now 0×0 0000 1F40, wherein 1F40 is thehexadecimal value equivalent to 8000. This is an accurate result becausedescriptor 202 a represents the second 1000 rows of the 10,000 rows ofdata that are required to be processed in FIG. 2, therefore, an offsetfrom the initially specified address is required. Read descriptor parserlogic block 121 b transmits the descriptor data to the appropriate loadengine block of data movement engine 130 a. The appropriate load engineblock of data movement engine 130 a processes descriptor 202 a datasimilar to the processing of descriptor 201 a data. Data retrieved fordescriptor 202 a is stored in DMEM 102 a at the destination memoryaddress specified in descriptor 202 a.

DMEM 102 a address of descriptor 202 a is transmitted from descriptorreturn block of DMAC 140 to descriptor channel block 108 a of DMAD 106 asimilar to the way DMEM 102 a address of descriptor 201 a wastransmitted above. Descriptor channel block 108 a sets notify event tosignal to the core processor 103 a that data requested by descriptor 202a is ready to be processed. In FIG. 2, the notify event identified bythe “Notify” field of descriptor 202 a is Event1. Descriptor channelblock 108 a again determines whether the loop count is zero and if it iszero, then descriptor channel block 108 a completes processing ofdescriptor similar to the way described above for descriptor 201 a. Ifthe loop count is not zero, then descriptor channel block 108 aterminates the processing of descriptor 202 a for this particulariteration.

Hardware Implemented Looping Mechanism

After descriptor channel block 108 a transmits descriptor 202 a data toarbitration unit 112 a, descriptor channel block 108 a determines DMEM102 a address of the next descriptor within the active list of thedescriptor channel block based on the link address field of descriptor202 a. Descriptor channel block 108 a retrieves data of descriptor 203 afrom DMEM 102 a address 0×5020. Descriptor channel block 108 adetermines that descriptor 203 a is a program or control type descriptorand in particular a loop type descriptor. Descriptor channel block 108 adetermines whether the loop count or iteration count is zero and if itis not zero, then descriptor channel block 108 a decrements the loopcount value by 1. As described above, the loop or iteration count isstored in a particular register designated for storing loop count valuesand the descriptor channel block retrieves the loop count value from theparticular register and determines whether the loop count value is zeroor not. If the loop count is not zero, then the descriptor channel blockupdates the loop count by decrementing the loop count value by 1 andstores the updated loop count value in the particular register. In FIG.2, the iteration count value starts at 4, therefore, the first timedescriptor 203 a is processed, the loop or iteration count is 4 andafter it is decremented by descriptor channel block 108 a, the loop oriteration count will be

In response to determining that the loop or iteration count is not zero,descriptor channel block 108 a determines which descriptor it shouldloop back to and reprocess. Descriptor channel block 108 a determineswhich descriptor it should loop back to based on descriptor 203 aspecifying a loop back address that identifies the DMEM address of thedescriptor that should be processed again. In FIG. 2, the loop backaddress is specified in the “Loop Addr” field of descriptor 203 a andDMEM 102 a address of 0×5000 is the address of descriptor 201 a withinthe DMEM 102 a.

Descriptor channel block 108 a retrieves descriptor 201 a data from DMEM102 a. Descriptor channel block 108 a determines whether the waitcondition of descriptor 201 a is satisfied based on value of eventEvent0. In FIG. 2, the wait condition of descriptor 201 a is satisfiedif Event0 value is 0. As described above, descriptor channel block 108 apreviously set the value of Event0 to 1 in order to indicate to coreprocessor 103 a that data is available for processing at the destinationaddress specified by descriptor 201 a. Therefore, if core processor 103a did not complete its processing of the data at the destination addressspecified by descriptor 201 a, then the core processor will not clearEvent0 to 0, hence descriptor channel block 108a must wait until theEvent0 value is cleared to 0, i.e. set to 0.

If Event0 value is cleared to 0, then descriptor channel block 108 aprocesses descriptor 201 a similar to the way descriptor 201 a wasprocessed in the previous iteration, described above. Descriptor channelblock 108 a continues to traverse the active list of the hardware datachannel and based on the link address data of descriptor 201 a retrievesdescriptor 202 a data. Descriptor channel block 108 a processesdescriptor 202 a similar to the way it was processed in the previousiteration. Descriptor channel block 108 a continues to traverse theactive list of the hardware data channel and based on the link addressdata of descriptor 202 a retrieves data of descriptor 203 a.

Descriptor channel block 108 a again determines whether the loop countis 0. Loop count value is 3, therefore, descriptor channel block 108 adecrements the loop count value by 1 and again loops back to descriptor201 a and processes descriptor 201 a again. Descriptor channel block 108a continues to loop through the descriptors until the loop count valueis 0. When the loop count value is 0, descriptor channel block 108 adetermines whether source or destination counters of the descriptorchannel block 108 a should be reset. In FIG. 2, descriptor 203 aspecifies, with “Src Count Reset” and “Dest Count Reset”, fields thatsource and destination counters of hardware data channel must be reset.

Descriptor channel block 108 a notifies core processor 103 a that theloop has terminated or finished by setting the value of Event30 to 1since Event30 is specified in descriptor 203 a as the event that thecore processor is configured to receive a notification from fordescriptor 203 a. Descriptor channel block 108 a also decrements theactive list count of the hardware data channel by 1. Processing ofdescriptor 203 a is now complete and consequently processing ofdescriptors 201 a and 202 a. Thus, 10,000 rows of data from a sourcememory location have been processed by the data movement system.

Moving a Data Table Using Descriptors

FIG. 3 illustrates an example of moving an entire data table, comprisingfour columns, from a source memory to a local DMEM using descriptors.FIG. 3 comprises four data descriptors, 310 a, 311 a, 312 a, 313 a andone control descriptor 314 a. Each descriptor represents a column ofdata of the data table stored in the source memory. Source memory inFIG. 3 is a DDR memory external to the data movement system. Destinationmemory in FIG. 3 is a DMEM, local to the core processor that programmeddescriptors 310 a, 311 a, 312 a, 313 a. For the purpose of illustratinga clear example, FIG. 3 will be described using the hardware componentsand processes described in FIG. 1 and FIG. 2. For the purpose ofillustrating a clear example, descriptors in FIG. 3 are also programmedby core processor 103 a.

Descriptor 310 a specifies the starting address of the first column ofthe data table in the source memory at the “Src Addr” field ofdescriptor 310 a. Similarly, descriptors 311 a, 312 a, 313 a, specifystarting addresses of the second, third and fourth columns of the datatable in the source memory as their respective source addresses. Withinthe “Dest Addr” field, Each of the descriptors 310 a, 311 a, 312 a, 313a specify a different destination address within DMEM 102 a, the DMEMlocal to core processor 103 a. Descriptor 314 a is a loop descriptorwhich indicates that the descriptor channel block that processes thesedescriptors should loop back to descriptor 310 a, the descriptor that isstored at the DMEM 102 a address specified in descriptor 314 a.

One of the descriptor channel blocks of DMAD 106 a will add descriptors310 a, 311 a, 312 a, 313 a, 314 a to the active list of the hardwaredata channel controlled by the descriptor channel block similar to theway descriptor channel block in FIG. 2 added descriptors to the activelist. The descriptor channel block will begin processing descriptors ofFIG. 3 with descriptor 310 a. Processing of descriptor 310 a is similarto the way descriptor processing has been described in FIG. 2 and FIG.1.

However, unlike FIG. 2, the source address counter of the descriptorchannel block will not be incremented after descriptor 310 a data istransmitted to the arbitration unit 112 a because descriptor 310 a doesnot specify that the source address counter should be incremented. Thisis accurate for FIG. 3 because source addresses of descriptors 311 a,312 a, and 313 a are different for each since each descriptor isprocessing a different column of data of the data table, each of thedescriptors 311 a, 312 a, and 313 a, in the first iteration of the loop,should process their respective column of data from the source addressspecified in the descriptor, without any offset from the source address.Similarly, descriptor 311 a, 312 a also do not specify that sourceaddress should be incremented in order to ensure that the descriptorfollowing them begins processing their respective columns of data fromthe correct memory address.

Descriptor 313 a data specifies that the source address counter shouldbe incremented. Thus, the source counter of descriptor channel block 108a is incremented after control information of descriptor 313 a istransmitted to arbitration unit 112 a. Incrementing source addresscounter after the last bytes of the control information of descriptor313 a is transmitted ensures that the next time descriptors 310 a, 311a, 312 a, 313 a are processed the source address specified in 310 a, 311a, 312 a, 313 a are adjusted, modified or offset accurately. Theremaining aspects of processing and returning descriptors 310 a, 311 a,312 a, 313 a, 314 a are similar to the way it is described in FIG. 1 andFIG. 2.

Thus, data movement system may copy an entire data table from a sourcememory and store the data table in a destination memory usingdescriptors.

Partitioning

Partitioning of rows is performed in three stages, which are referred toherein as partitioning stages. The partitioning stages are illustratedherein using an example set of columns, which are depicted in FIG. 4A.FIG. 4B depicts the partitioning stages. The partitioning stages areperformed, at least in part, by components of DMAC 140. FIG. 4C is adiagram depicting a view of DMAC 140, the view highlighting componentsthat participate in partitioning.

In general, partitioning involves moving columns from main memory to DMSmemory 150 (specifically column memory 474), which in effect is anintermediary memory where the columns are staged to be partitioned amongscratch pads of core processors. For each row to be partitioned, anidentifier is generated that identifies a core processor to which therow is assigned by partitioning. The identifier generated is referred toherein as a core processor identifier (CID). A row is moved to the DMEMof the core processor identified by the row's respective CID.

Referring to FIG. 4A, it depicts four columns, key column key 1, keycolumn key2, pay load column pay3, and pay load column pay4, as storedin main memory, and which together comprise rows 415. Each of thesecolumns may be stored contiguously in main memory, or may be stored inmultiple “chunks” of contiguous memory. A key column is a column havingvalues that are used to generate CIDs. A pay load column is not used togenerate CIDs.

In general, to partition rows, Data Movement System 101 partitions therows by subsets of the rows. For example, if rows 415 comprise 1k rows(1024 rows), then 4 subsets comprising 256 rows each are partitionedtogether by Data Movement System 101.

Partitioning Stages

FIG. 4B depicts partitioning stages according to an embodiment of thepresent invention. Referring to 4B, in the first partitioning stage 421,which is referred to herein as the “DMS load stage”, a subset of rowsare loaded in the DMS memory 150 from main memory. The rows to loadshould include at least one key column.

In the second partitioning stage 422, referred to herein as the “CIDgeneration stage”, a list of CDs are generated based on the one or morekey columns loaded in the DMS load stage. A CID is generated for andassociated with each row of the subset that resides in the DMS loadstage.

In the third partitioning stage 423, referred to herein as the “Corepartitioning stage”, the subset of rows is distributed among the coreprocessers. Each row is moved to the core processor identified by therow's respective CID.

Partitioning Descriptors

The Data Movement System 101 is configured to partition rows through theuse of linked descriptors, referred to herein as a partitioning chain.Within a partitioning chain, a different set of linked descriptors areused for each partitioning stage, each set being referred to herein as apartitioning sub-chain. Descriptors are referred to herein as beinglinked, in a chain, or sub-chain, when the descriptors are linked byData Movement System 101 (e.g. by a DMAD) by setting Link Addr field torefer to another descriptor that is the same or another chain orsub-chain. The rows are partitioned using components of Data MovementSystem 101 depicted in FIG. 4C. Partitioning of rows by Data MovementSystem 101 is illustrated in the context of rows 415. An illustrativepartitioning chain 430 that may be used for partitioning is depicted inFIG. 4D.

In FIG. 4D, partitioning chain 430 may be generated by any of the one ormore core processors within Data Movement System 101. The partitioningchain, once generated by a core processor, is forwarded to DMAC 140 viaa DMAD for processing in the way previously described for descriptors.For purposes of illustration, core processor 104 g is generatingpartitioning chain 430, and core processor 104 g uses DMAD 115 g toforward descriptors of partitioning chain 430 to DMAC 140 in the orderdepicted in FIG. 4D for execution.

Referring to FIG. 4D, DMS load sub-chain 451 comprises data descriptor431, data descriptor 432, data descriptor 433, and data descriptor 434.The data descriptors in DMS load sub-chain 451 cause execution of theDMS load stage. Each of these data descriptors specify a source addressin main memory for a different column for a subset of rows 415 and adifferent destination address within column memory 474, an area ofmemory within DMS memory 150. Each data descriptor also specifies 256 asthe number of rows to move to DMS memory 150. Data descriptor 431 is forcolumn key1, data descriptor 432 is for column key2, data descriptor 433is for column pay3, and data descriptor 434 is for column pay4.

Data descriptor 431 includes an attribute, referred to herein a keycolumn tag, that identifies column key1 as a key column. Data descriptor432 includes a key tag to identify column key2 as a key column.

When a data descriptor with a key flag is forwarded to DMAC 140, it isinitially processed by read descriptor parser logic block 121 b. Readdescriptor parser logic block 121 b notifies HARE engine 473 of receiptof a data descriptor with a key flag. HARE engine 473 is a group ofelectronic circuits that generates hash values and/or CIDS based on theone or more columns indicated by key column register 471. Key columnregister 471 is a FIFO register. When HARE engine 473 is notified ofdata descriptor 431, HARE engine 473 adds, as specified by datadescriptor 431, the address that holds column key1 in column memory 474and the width of column key1 to key column register 471. An entry in keycolumn register 471 is added for data descriptor 432 in the same way.

HARE Descriptor

CID generation sub-chain 452 comprises one descriptor, HARE descriptor435. HARE descriptor 435 specifies to generate CID's based on keycolumns identified by key column register 471. HARE descriptor 435includes various fields, each specifying an aspect of generating a CID.A HARE descriptor is forwarded by the read descriptor parser logic block121 b to HARE engine 473, which generates the CID's accordingly.

FIG. 4E shows CID array 417. HARE engine 473 generates CID array 417when executing HARE descriptor 435. Each element in CID array 417corresponds to a row in rows 415, and, upon completion of executing HAREdescriptor 435, holds a CID for every row in 415. CID 417 is stored inCID memory 476.

HARE descriptor 435 includes a field that specifies an algorithm forgenerating CID's. According to an embodiment, one of three algorithmsmay be specified, which are Radix, Radix/Hash, and Range.

Under the RADIX algorithm, the value represented by a contiguous rangeof bit positions in a key column is used as, in effect, a CID. RADIXregister 477 specifies the range of bit positions, and key columnregister 471 specifies the key column. For example, to identify 32 coreprocessors, RADIX register 477 stores a value specifying bit positionrange 0 through 4. For a column value of a row in a key column in columnmemory 474, HARE engine 473 sets the corresponding element in CID array417 to the value of bits 0 through 4 of the column value.

Under RADIX/HASH algorithm, CID's are generated by, in effect, applyingthe RADIX algorithm to hash values generated from one or more keycolumns. Specifically, a hash value column containing the hash values isgenerated using one or more key columns identified by key columnregister 471. Hash value column 416 is used to generate a CID array.Hash value column 416 is stored in hash column memory 475, at an addressspecified by a field of a HARE descriptor. The hash column contains ahash value for each row in the one or more key columns. A bit range ofthe hash column is used to generate the CID's for a CID array, the bitrange being specified by RADIX register 477.

For example, a field in HARE descriptor 435 specifies the RADIX/HASHalgorithm for generating CID's and RADIX register 477 specifies bitposition 0-4. From the first row of columns key 1 and key2, HARE engine473 generates a hash value and stores the hash value as the first row inhash column 416. Hash column 416 is stored in hash column memory 475.The first five bits of this hash value are stored as the value in thefirst row in CID array 417. From the second row of key1 and key2, HAREengine 473 generates a hash value and stores the hash value as thesecond row in hash column 416. The first five bits of this hash valueare stored as the value in the first element in CID array 417.

Range Algorithm

Under range partitioning, a CID for a row is generated by comparing acolumn value in a row of a key column to a configurable number ofincrementing range values. If the configurable number of range values is“R,” the comparsion results in each row being placed into one of Rranges. The CID for a row is then determined by using the CID assignedto the range by a “range-to-CID mapping” stored in one or more rangeconfiguration registers. According to an embodiment, range configurationregisters are in DMAC 140 and comprise a range configuration registerfor each CID, where the CID represents a core processor. Each rangeconfiguration register is associated with a range and stores a CIDmapped to that range. A configuration register is programmed using aprogram descriptor. In effect, each range configuration registrationholds an entry in the range-to-CID mapping, mapping that range to a CID.

The range-to-CID mapping that can be programmed into range configurationregisters is flexible. Multiple ranges may be mapped to the same CID ormultiple CDs can mapped to the same range. Not every CID need be mapped.

When a range is mapped to multiple CIDs, whenever HARE engine 473determines a range based on a column value in a key column, a CID isassigned in a linear incrementing fashion, starting at the entry thatmaps that range to a CID and incrementing the CID until it is one lessthan the CID assigned to the next range. This technique can be used tohelp reduce CID skew when it is known that one range will have morematches than other ranges. Instead of a single CID being used over andover when there is a match to that range, multiple CDs are used, andthey are used such that the distribution to those CIDs is even.

Descriptors Used for Partitioning

Once a CID array is generated for a HARE engine descriptor, after theCID generating stage ends for a set of rows, the core partitioning stagemay commence. Core partitioning descriptors are used to configure DataMovement System 101 for the core partitioning stage. FIG. 4D depictscore partitioning sub-chain 453, which comprises core partitioningdescriptors. Core partitioning sub-chain 453 includes core partitioningdescriptor 441, core partitioning descriptor 442, core partitioningdescriptor 443, core partitioning descriptor 444, and core partitioningdescriptor 445. Each of descriptor 441, core partitioning descriptor442, core partitioning descriptor 443, core partitioning descriptor 444,and core partitioning descriptor 445 is a data descriptor forpartitioning a respective column from DMS memory 150 to DMEM memory, therespective column being partitioned among the core processors accordingto CID's in CID array 417. Each includes a partition flag attributespecifying that a respective column is to be partitioned according toCID array 417. Hence, core partitioning descriptors 441, 442, 443, 444,and 445 are referred to herein as core partitioning descriptors.

Each of these partitioning descriptors identifies a column to bepartitioned among core processors. The Source Addr identifies the columnby referencing the column's address in column memory 474. Corepartitioning descriptor 441 identifies column key1, core partitioningdescriptor 442 identifies column key2, core partitioning descriptor 443identifies column pay3, and core partitioning descriptor 444 identifiescolumn pay4. Each of the descriptors also specifies the respectivecolumn's width. The core partitioning descriptor 445 has an attributeset to indicate that core partitioning descriptor 445 is the lastpartitioning descriptor in partitioning sub-chain 453.

Core partitioning descriptor 445 identifies hash column 416. Thedescriptor, when executed, causes the partitioning of hash column 416among the core processors of Data Movement System 101. In effect, acolumn comprising hash values generated from other columns of rows 415is added to rows 415.

Each partitioning descriptor specifies a destination address (i.e. inthe Destination Addr.) in DMEM. The destination address is an area inDMEM memory referred to herein as a column FIFO buffer. For each corepartitioning descriptor, the core processors in Data Movement System 101have a respective column FIFO buffer in scratchpad memory at thedestination address.

Partitioning engine 472 transmits rows partitioned to a core processoralong a “partition data path” connected to partitioning engine 472 andthe respective DMEM interface block of the core processor. The partitiondata path comprises digital circuitry in a data movement engine and theFIFO register of the respective DMAD of the core processor. Therespective DMAD block of the core processor receives the rows of rows415 that are partitioned to that core processor and, via the respectiveDMEM interface block of the core processor, puts the rows in that coreprocessor's respective column FIFO buffer. For example, partitioningengine 472 transmits rows partitioned to core processor 103 a along thepartition data path in data movement engine 130 a and FIFO register 114b. DMAD 106 a receives the rows and puts, via DMEM interface block 107a, the rows in the respective column FIFO buffer of core processor 103a. In this way, core processor 103 a receives the rows partitioned tocore processor 103 a by partition engine 472.

When a DMAD block of a core processor forwards a core partitioningdescriptor to DMAC 140, read descriptor parser logic block 121 bforwards the core partitioning descriptor to partition engine 472.Partition engine 472 then partitions the column identified by thepartitioning descriptor according to the CID array 417.

For example, assume the first four elements in CID array 417 contain thefollowing CID's: 0, 6, 16, 0, which identify core processors 103 a, 103g, 104 a, and 103 a, respectively. To process core partitioningdescriptor 441, partition engine 472 reads the first row of column key1and the first CID value from the first element in CID array 417 andforwards the first row of column key1 to core processor 103 a, which isidentified by first CID value 0. The core receives the partitioned data,placing the row in the column FIFO buffer of 102 a at the addressspecified by the field Dest Addr of core partitioning descriptor 441.Partition engine 472 forwards the second row of column key1 to coreprocessor 103 g, as identified by CID value 6. The core receives thepartitioned data, placing the row in the column FIFO buffer of 102 gidentified by the field Dest Addr of core partitioning descriptor 441.The third row is processed in similar fashion, except it is added to thecolumn FIFO buffer of core processor 104 a.

Partition engine 472 forwards the fourth row of column key1 to coreprocessor 103 a, as identified by CID value 0 in the fourth element ofCID array 417. The core receives the partitioned data, adding that rowto the column FIFO buffer of 102 a , which already holds the first rowfrom column key 1.

Partition engine 472 processes core partitioning descriptors 442, 443,444, and 445 in similar fashion. Note, however, rows for thesedescriptors are placed in a column FIFO buffer that is different betweeneach partitioning descriptor of core partitioning sub-chain 453. Forcore partitioning descriptor 445, the rows of hash values are obtainedfrom hash column memory 475, and specifically, from hash column 416.

Sub-Buffering

In order for a core processor to process rows partitioned to that coreprocessor for a core partitioning sub-chain, that core processor must beable to determine when partitioned rows are stored in the respectivecolumn FIFO buffers of the core partitioning sub-chain.

According to an embodiment, a core processor is notified when a batch ofone or more rows have been completely added to the column FIFO buffers.The batch size (i.e. number of rows) is configurable, and may be set toone. The batch size may be configured by setting a batch size registerusing a program descriptor. A batch size register resides in each DMADblock. A batch size register of a DMAD block may also be configured bythe respective core processor of the DMAD block by writing directly tothe batch size register via a configuration interface.

Each of the column FIFO buffers is treated as a circular buffer. For aparticular core processor, the respective column FIFO buffers are, ineffect, associated with the same tail index and head index. The tailindex specifies the index of a first unread row (in FIFO order) in anyof the respective column FIFO buffers of a core processor. A head indexspecifies the index of where a row should be added to any of the columnFIFO buffers.

As shall be described in greater detail, the electronic circuitry of DMS101 manages aspects of flow control with respect to a column FIFObuffer, which includes maintaining a tail index and head index on a percore processor basis, and preventing “buffer overflow”, that is,preventing the overwriting of unread rows in the column FIFO buffers ofany core processor. Such flow control may include ceasing thedistribution of partitioned rows to the column FIFO buffers to preventbuffer overflow.

For the particular set of rows being partitioned for a core partitioningsub-chain for a core processor, the tail index and head index is updatedin response to adding rows to the “last” column FIFO buffer for thepartitioning descriptor that is marked as a last descriptor in a corepartitioning sub-chain. The tail index and head index is used for allcolumn FIFO buffers for the core partitioning sub-chain, and are notchanged until the entire row is added to all these column FIFO buffers.A row is entirely added when the row is added to the last column FIFObuffer.

Notifying a core processor of the addition of a row to the respectivecolumn FIFO buffer (or the update of a tail index) entails a certainamount of overhead. The overhead may be reduced by notifying a coreprocessor when a batch of multiple rows is added. As mentioned before,batch size is configurable. A core processor is notified when a numberof multiple rows is added to the respective column FIFO buffers, wherethat number is equal to the configured batch size.

Sub-Buffers

When the batch size is greater than one, a column FIFO buffer iseffectively divided into sub-buffers. When a number of rows equal to thebatch size is added to a last column FIFO buffer and the core processoris notified, a sub-buffer comprising that number of rows is madeavailable to a core processor for processing. The batch size is henceforth referred to herein as the sub-buffer size.

FIG. 5A depicts an illustrative column FIFO buffer 502 a that holds rowspartitioned to core processor 103 a for core partitioning descriptor 445and that reside in DMEM unit 102 a. Column FIFO buffer 502 a comprises256 rows. The sub-buffer size of column FIFO buffer 502 a is 64. Hence,column FIFO buffer 502 a comprises four sub-buffers: sub-buffer 511,sub-buffer 512, sub-buffer 513, and sub-buffer 514.

The column FIFO buffers in DMEM unit 102 a for the core partitioningdescriptors 441, 442, 443, and 444 also have sub-buffers of the samesize.

When sub-buffer 511 of column FIFO buffer 502 a is filled, and it andthe respective other sub-buffers of the other column FIFO buffers aremade available for processing to a core processor, the core processor isnotified and provided a tail index. The tail index points to the firstrow in the sub-buffer, and is hence forth referred to herein as thesub-buffer index. The sub-buffer index points to a set of rows in acolumn FIFO buffer that has not been processed by the core processor.Given a sub-buffer size, the core processor processes, for each columnFIFO sub-buffer, that number of rows beginning with the row pointed toby the sub-buffer index.

An index, such as a sub-buffer index, tail index, and head index, refersto an ordinal position of row within a column FIFO buffer. In order touse the index to access a row in any particular column FIFO buffer, theindex is resolved to a memory address. A core processor, pursuantexecution of software, calculates a memory address for the row using thebase memory address of the column FIFO buffer (as specified in theDestination Addr field of the respective core partitioning descriptor),the width of the column, according to the following formula, whichassumes that the index value for the first row is zero.Row Memory Address=base memory address+(index*column width)Thus, in this way, an index may be used to identify a row (or thebeginning of a set of rows) to access in each of the column FIFObuffers.

Row Processing and Flow Control

According to an embodiment of the present invention, the electroniccircuitry of a DMEM interface block is configured for handling aspectsof flow control for each column FIFO buffer. Such aspects of flowcontrol include: (1) maintaining a tail index and head index for eachcolumn FIFO buffer of a partitioning descriptor that is flagged as thelast partitioning descriptor, (2) notifying a core processor when asub-buffer has been filled with rows, and (3) signaling to partitionengine 472 to stop partitioning and distributing rows to prevent columnFIFO buffer overflow.

A core processor executing software also participates in handlingaspects of the flow control of a column FIFO buffer. These includesignaling to the respective DMEM interface block that a sub-buffer hasfully been read, processed, and/or is otherwise available to receive newpartitioned rows.

FIG. 5B is a diagram depicting operations performed by a core processor103 a and DMEM interface block 107 a to process rows forwarded to a coreprocessor 103 a by partition engine 472.

Referring to FIG. 5B, at 520, core processor 103 a receives notificationfrom DMAD DMEM interface block 107 a that a sub-buffer of the lastcolumn FIFO buffer has been filled, along with a sub-buffer index. At522, core processor 103 a processes rows in the sub-buffers identifiedby the sub-buffer index, which not only include the last column FIFObuffer for core partitioning descriptor 445, but the other column FIFObuffers for core partitioning descriptors 441, 442, 443, and 444. At523, core processor 103 a sends notification that the sub-buffers havebeen fully processed.

At 524, core processor 103 a waits for the next notification that asub-buffer is available. While waiting, or in lieu of waiting, coreprocessor can perform other operations and work.

DMEM interface block 107 a performs operations 530-538. At 530, DMEMinterface block 107 a receives rows from partition engine 472partitioned to core processor 103 a. A column of rows are received foreach partitioning descriptor in core partitioning sub-chain 453; DMEMinterface block 107 a fills the respective column FIFO buffer with therows. The last column of rows received for core partitioning sub-chain453 are those for last core partitioning descriptor 445.

At 532, after adding a quantity of the last column of rows that is equalto or greater than the sub-buffer size of the respective column FIFObuffer, DMAD DMEM interface block 107 a sends a notification to coreprocessor 103 a that a sub-buffer has been filled, along with thesub-buffer index.

DMEM interface block 107 a maintains the sub-buffer index and headindex. This maintenance includes performing any wrapping aroundoperation as is needed for a circular buffer.

With respect to the head index, DMEM interface block 107 a incrementsthe head index as each row is added to the column FIFO buffer for thefirst partitioning descriptor in core partitioning sub-chain 453. Thevalue of the head index controls, in effect, whether to stop adding newrows to the column FIFO buffer to prevent buffer overflow. The value ofthe head index is prevented from reaching that of the sub-buffer index.

At 534, DMEM interface block 107 a detects whether the differencebetween the head index and sub-buffer index satisfies “Full Criteria”.The full criteria is based on a threshold difference between the headindex and sub-buffer index. Once the difference is at or less then thethreshold, then full criteria is satisfied. Once it is determined thatthe full criteria is satisfied, at 536, DMEM interface block 107 asignals partition engine 472 to stop partitioning. Specifically, DMEMinterface block 107 a back pressures the respective partition data pathand when the partition data path becomes full, partition engine 472stops partitioning. The threshold difference upon which the fullcriteria is based is configurable by a DMAD register using a programdescriptor or by the respective core processor of a given DMAD writingthe register through a configuration interface.

At 538, the sub-buffer index is incremented by the DMEM interface block107 a in response to a receipt of a notification by the core processor103 a that it has processed the rows of a sub-buffer. If the DMEMinterface block 107 a had detected that the full criteria had beensatisfied, it re-evaluates the criteria after the sub-buffer index isincremented. When the DMEM interface block 107 a detects that fullcriteria is no longer satisfied, DMEM interface block 107 a signalspartition engine 472 to begin partitioning the first core partitioningdescriptor 441.

Partition Pipelining

According to an embodiment of the present invention, pipelining allowsvarious resources, such as partition engine 472, and HARE engine 473, tobe concurrently used to process a subset of rows for differentpartitioning sub-chains. Each of the three partitioning stages can beexecuted concurrently (i.e. within the same clock cycles) to processdifferent subsets of rows.

FIG. 6A is a diagram depicting partitioning pipelining according to anembodiment of the present invention. Referring to FIG. 6A, pipelinedsets 601, which comprise three pipelined sets of partitioningdescriptors, each set processing the same rows from main memory. Two ofthe sets are shown twice in FIG. 6A as described below. Each pipelinedset includes a partitioning sub-chain for each partitioning stage; eachpartitioning sub-chain being unlinked with another partitioningsub-chain in the respective pipelined set, i.e., the Link address fieldof the last descriptor in partition chain is not linked to the firstdescriptor of another partitioning sub-chain in the respective pipelinedset. Order of execution between partition sub-chains in a pipelined setis controlled through wait for conditions, as explained below. Thepipelined sets include:

-   a. DMS load sub-chain A1, CID generation sub-chain A2, and core    partitioning sub-chain A3 for partitioning a respective set of rows.    In FIG. 6A this set is shown twice—the second time this set executes    on a different respective set of rows;-   b. DMS load sub-chain B1, CID generation sub-chain B2, and core    partitioning sub-chain B3 for partitioning another respective set of    rows. In FIG. 6A this set is shown twice—the second time this set    executes on a different respective set of rows, and-   c. DMS load sub-chain C1, CID generation sub-chain C2, and core    partitioning sub-chain C3 for partitioning yet another respective    set of rows.

Intervals I1 through I7 are an ordered sequence of periods of time. Ineach of the intervals I1 through I7, Data Movement System 101 may beconcurrently executing up to three partitioning sub-chains, one for eachpartitioning stage.

For each pipelined set, partitioning sub-chains are executed inpartition stage order, and awaits for completion of the partitioningsub-chain that completed beforehand. For example, DMS load sub-chain A1is executed in interval I1. CID generation sub-chain A2, which must waitfor completion of execution of DMS load sub-chain A1, is executed ininterval I2. Core partitioning sub-chain A3, which must wait forcompletion of execution of CID generation sub-chain A2, is executed ininterval I3.

Through orchestration of wait for conditions, the partitioningsub-chains of a pipelined set are executed, in effect, in a loop. Thus,before DMS load sub-chain A1 is executed in interval I4 to process adifferent set of rows, execution of DMS load sub-chain A1 must wait forcompletion of core partitioning sub-chain A3 in interval I3.

Interval I1 and I2 comprise the initial phase of pipelining, referred toas the fill stage. In the fill stage, a partitioning sub-chain is notbeing executed for each partitioning stage. Because only onepartitioning sub-chain per partitioning stage may be executed in asingle interval, and the first partitioning stage for a subset of rowsbegins with DMS load stage, interval I1 includes only the execution ofone DMS load sub-chain, which is DMS load sub-chain A1. In interval I2,two partitioning sub-chains are executed, which are DMS load sub-chainB1 and CID generation sub-chain A2.

Intervals I3 through I5 comprise the full phase of pipelining, wherethree partitioning sub-chains may be executed concurrently, one for eachof the three partitioning stages. In interval I3, DMS load sub-chain C1,CID generation sub-chain B2, and core partitioning sub-chain A3 areexecuted concurrently. In interval I4, CID generation sub-chain C2, corepartitioning sub-chain B3, and DMS load sub-chain A1 are executedconcurrently.

Constructing and Submitting Partitioning Sub-Chains

According to an embodiment of the present invention, for eachpartitioning stage, a separate core processor forms and submits a chainof partitioning sub-chains.

Referring to FIG. 6B, it depicts DMS load chain 611, comprising thepartitioning sub-chains for the DMS load stage from each of thepipelined sets, and in particular, comprising DMS load sub-chain A1, DMSload sub-chain B1, and DMS load sub-chain C1. Core processor 103 a formsthese chain descriptors within DMEM unit 102 a and submits the chaindescriptors to one of the descriptor channel blocks of DMAD 106 a. Thechain of descriptors also includes a loop descriptor for loopingexecution of DMS load chain 611. The loop descriptor and DMS load chain611 are configured for looping as described above.

CID generation chain 612 comprises the partitioning sub-chains for theCID generation stage, which comprise CID generation sub-chain A2, CIDgeneration sub-chain B2, and CID generation sub-chain C2. Core processor103 g forms CID generation chain 612 within DMEM unit 102 g and submitsCID generation chain 612 to a data channel DMAD 106 g. The chain ofdescriptors also includes a loop descriptor for looping execution of CIDgeneration chain 612. The loop descriptor and CID generation chain 612are configured for looping as described earlier.

Core partitioning chain 613 comprises the partitioning sub-chains forthe core partitioning stage, which comprise core partitioning sub-chainA3, core partitioning sub-chain B3, and core partitioning sub-chain C3.Core processor 104 a forms core partitioning chain 613 within DMEM unit105 a and submits core partitioning chain 613 to one of the descriptorchannel blocks of DMAD 115 a. The chain of descriptors also includes aloop descriptor for looping execution of core partitioning chain 613.The loop descriptor and core partitioning chain 613 are configured forlooping as described earlier.

For a set of rows processed by an execution of a set of partitioningsub-chains, the partitioning sub-chain must be executed in partitioningstage order. When the partitioning sub-chains are submitted by the samecore processor, the partitioning sub-chains are executed in the ordersubmitted to the given descriptor channel of the respective DMAD. Thus,as long as the partitioning sub-chains are submitted in partition stageorder, the sub-chains are executed in the partition stage order. It isimportant to keep certain descriptors from starting until certain otherdescriptors have completed. For example, the CID generation sub-chain A2is prevented from starting until the DMS load sub-chain A1 hascompleted.

However, for pipelined sets 601, the partitioning sub-chains of eachpartitioning stage are submitted by different core processers.Therefore, for a given set of rows processed by a set of partitionsub-chains, execution of the sub-chains must be synchronized such thatthe set of partition sub-chains are executed in partition stage order.

According to an embodiment, such synchronization is orchestrated throughwait-events, as illustrated in FIG. 6B. Specifically, each partitionsub-chain is associated with a wait condition that must be satisfiedbefore execution of the partitioning sub-chain begins. Execution of thepartition sub-chain is blocked until the wait condition is satisfied.The wait condition is based on an event. The wait condition for apartition sub-chain is specified by the “wait for” field of the firstdescriptor in the partition sub-chain.

For example, for DMS load sub-chain A1 the wait condition is Event0equal to 0, for CID generation sub-chain A2 the wait condition is Event3equal to 0, and for core partitioning sub-chain A3 the wait condition isEvent6 equal to 0.

Completing execution of a partition sub-chain causes: (a) setting theevent to a state that causes the wait condition for the partitionsub-chain to be unsatisfied, thereby blocking the partition sub-chainfrom executing, and (b) the setting of another event to a state thatsatisfies a wait condition of a subsequent partition sub-chain in thesame pipelined set, thereby unblocking the subsequent partitionsub-chain from executing.

Completing execution of a partition sub-chain may entail setting twoevents for purpose of synchronization. In an embodiment, a descriptormay only set one event. Therefore, a partition sub-chain may include anadditional descriptor, the purpose of which is to set an event.

For example, initially, core processor 103 a sets events such that onlyexecution of DMS load sub-chain A1 is permitted and execution of CIDgeneration sub-chain A2 and core partitioning sub-chain A3 is blocked.Accordingly, core processor 103 a clears Event°, i.e. sets to 0, andsets both Event3 and Event6 to 1. Completing execution of DMS loadsub-chain Al sets Event0 to 1, thereby blocking DMS load sub-chain A1from executing again, and clears event3, thereby unblocking CIDgeneration sub-chain A2 from executing. Completion of execution CIDgeneration sub-chain A2 sets event3 to 1, thereby blocking CIDgeneration sub-chain A2 from executing again, and clears Event6, therebyunblocking core partitioning sub-chain A3 from executing. Completion ofexecution core partitioning sub-chain A3 sets Event6 to 1, therebyblocking core partitioning sub-chain A3 from executing again, and clearsEvent0, thereby unblocking subsequent DMS load sub-chain A1 fromexecuting.

Row Identification Numbers

According to an embodiment, Data Movement System 101 may be configuredto generate a column of RIDs that may be used to perform row resolutionbetween source columns and resultant columns generated from the sourcecolumn, or other columns that are row aligned with the source column.

FIG. 7 illustrates RIDs and how RIDs may be used to perform rowresolution. Referring to FIG. 7, it depicts source column SC7 702, whichis partitioned by Data Movement System 101 into three resultant columns,resultant column RC1 731, resultant column RC2 732, and resultant columnRC3 733.

FIG. 7 also depicts non-partitioned columns NP3 703, NP4 704, and NP5705. These columns are row-aligned with source column SC7. However, thecolumns are not partitioned in the current illustration.

RID column RID7 is a column comprising RIDs. The RIDs in a RID columnare an ordered sequence of numbers when the RID column is initiallygenerated according to a descriptor. In an ordered sequence of numbers,each number differs from an adjacent number in the sequence by the sameconstant, referred to herein as a counter value. A counter value isoften the value one. The first RID in the sequence is referred to as thestarting value.

To use RIDs in RID column RID7 to perform row resolution, RID columnRID7 is assumed to be row aligned with source column SC7. Accordingly,row 714 contains the RID 1004 and the value “E” in source column SC7.

Based on the starting value of an ordered sequence of RIDs in a RIDcolumn and the respective counter value, the RID of a row in the RIDcolumn may be used to perform row resolution for that row on othercolumns that are row aligned to the RID column.

For example, given a starting value of 1000 and counter value of 1, RID1008 may be resolved to row 718.

Row Resolution for Data Manipulation Operations that Preserve RowAlignment

A data manipulation operation may be performed on multiple sourcecolumns such that row alignment is preserved between respectiveresultant columns. The descriptor based partitioning described earlieris an example of such a tabular data operation that preserves rowalignment between resultant columns. When a source column is a RIDcolumn that contains an ordered sequence of RIDs and is row aligned withanother particular source column, and when row alignment betweenresultant columns is preserved by a data manipulation operation that isapplied to both source columns, a resultant RID column may be used toperform row resolution between a resultant column generated for theother particular source column and other particular source column.

Referring to FIG. 7, RID column RID7 and source column SC7 arepartitioned such that the same row belongs to the same partition. Thus,the respective pair of resultant columns for each partition are rowaligned (each partition is stored in DMEM of a different coreprocessor). Resultant RID column RRID1 721 and resultant column RC1 731belong to the same partition and are row aligned, resultant RID columnRRID2 722 and resultant column RC2 732 belong to the same partition andare row aligned, resultant RID column RRID3 723 and resultant column RC3733 belong to the same partition and are row aligned.

To perform row resolution between a resultant column and a respectivesource column using a respective resultant RID column of the resultantcolumn, row-alignment-based resolution is used to obtain a RID for a rowfrom the resultant RID column, and the RID is used to perform RID-basedrow resolution on the source column. For example, to perform rowresolution between source column SC7 and resultant column RC3 for row718 in resultant column RC3, row-alignment-resolution is used to obtainthe RID for the row. Row 718 is the third element in resultant columnRC3. Therefore, the third element in resultant RID column RRID3 containsthe RID for row 718, which is 1008. Based on a RID value of 1008, thestarting value of 1000, and the counter value of 1, RID-based resolutionyields that row 718 is the ninth element in source column SC7.

RID-based resolution using resultant RID columns RRID1, RRID2, or RRID3may be used to perform row resolution not only between source column SC7and resultant columns RC1, RC2, or RC3, but also with other columns rowaligned with source column SC7. Thus, RID-based resolution usingresultant RID columns RRID1, RRID2, or RRID3 may be used to perform rowresolution between resultant columns RC1, RC2, and RC3, respectively,and any of non-partitioned columns NP3, NP4, and NP5.

Row Identification Numbers Generation

As mentioned previously, Data Movement System 101 generates RIDs withinvarious memories of Data Movement System 101. The RIDs are generated bya dedicated RID engine in each data movement engine (see FIG. 4C), eachRID engine comprising a set of electronic circuits that are designed togenerate a column of RIDs in response to reading a descriptor.

Referring to FIG. 4C, each data movement engine includes a RID engineand a RID memory unit. A RID memory unit is a type of DMS memory used tostore RIDs, although it is not limited to storing only RIDs. Datamovement engine 130 a includes RID engine 403 a and RID memory unit 404a, data movement engine 130 b includes RID engine 403 b and RID memoryunit 404 b, data movement engine 130 c includes RID engine 403 c and RIDmemory unit 404 c, data movement engine 130 d includes RID engine 403 dand RID memory unit 404 d.

According to an embodiment, a column of an ordered sequence of RIDs isgenerated in response to a data descriptor that specifies variousaspects of generating a column of RIDs. A data descriptor that is forgenerating a column of RIDs includes an attribute referred to herein asa “RID flag”, which specifies to generate a column of an orderedsequence of RIDS at a destination address specified in the destinationaddress field. The destination address may be within the DMEM of aparticular core processor, DMS memory 150, or RID memory. A datadescriptor that specifies to generate RIDs in this way is referred toherein as a RID descriptor.

Unlike for data movement that is performed for data descriptorspreviously described, generation of RIDs by Data Movement System 101does not involve moving data from the source address. Thus, for a RIDdescriptor, the source address field of a data descriptor is not treatedas a source address from which to obtain data to move. Rather, thesource address field is treated as counter value for generating asequence of RIDs, which is typically one. Thus, when the source addressfield value is one, successive RIDs in the sequence differ by one. Ifthe source address field value is two, successive RIDs in the sequencediffer by two.

A RID column may have a single-byte or multi-byte column width. TheColumn Width field in a RID descriptor specifies a column width.

In an embodiment, a RID starting value from which to start generating anordered sequence of RIDs in a RID column is specified in an auxiliarydata descriptor that precedes a RID descriptor. The RID descriptorincludes a “RID start flag” to specify that the auxiliary descriptorsets a RID starting value. A “RID Starting Value” field in the auxiliarydata descriptor specifies a RID starting value. Alternatively, the RIDstarting value may be specified by setting a register using a programdescriptor or by using a field in a RID descriptor. Specifying the RIDstarting value in an auxiliary descriptor may be advantageous foraccommodating larger RID starting values for larger column widths. Theremay be insufficient space available in a RID descriptor for a fieldlarge enough to specify the larger staring values.

Exemplary Partitioning Chain with RID Generation

As mentioned previously, RID generating is particularly advantageous foridentifying rows after the rows have been partitioned between coreprocessors. During partitioning, a RID column may be generated in columnmemory for columns being partitioned, which, in effect, adds a RIDcolumn for the rows in the columns being partitioned. When the RID ispartitioned to DMEM of a core processor, the row will include a RIDcolumn.

FIG. 8A shows partitioning chain 830 comprising descriptors that may beused to cause partitioning of the rows that include a RID column. FIG.8B shows columns generated and/or otherwise processed while partitioningrows according to partitioning chain 830.

Partitioning chain 830 partitions columns among core processors of DataMovement System 101, the columns include a RID column. Partitioningchain 830 includes DMS load sub-chain 851 for the load stage, CIDgeneration sub-chain 852 for the CID generation stage, and corepartitioning sub-chain 853 for the core partitioning stage.

DMS load sub-chain 851 comprises data descriptor 831, data descriptor832, auxiliary descriptor 833, and RID descriptor 834. Each of datadescriptor 831 and data descriptor 832 specifies a source address inmain memory for a different column for a subset of rows 415 and adifferent destination address within column memory 474. Data descriptor831 is for key column KEY8 811, data descriptor 832 is for pay columnPAY8 812. Data descriptor 831 includes a key column tag. Each datadescriptor also specifies 256 as the number of rows to move to DMSmemory 150.

Auxiliary descriptor 833 specifies a RID starting value of 1000 in theRID starting value field. When auxiliary descriptor 833 is forwarded toDMAC 140, it is initially processed by read descriptor parser logicblock 121 b. Read descriptor parser logic block 121 b detects theauxiliary descriptor contains a RID starting value, causing readdescriptor parser logic block 121 b to update an internal parserregister with the starting value. For purposes of illustration, the RIDstarting value is 1000. In an embodiment, a RID descriptor isimmediately preceded by an Aux descriptor that contains a RID startingvalue.

RID descriptor 834 is a RID descriptor. RID descriptor 834 includes aRID flag. RID descriptor 834 specifies a column width field of 1, adestination address within column memory 474, and 256 as the number ofrows to generate in a RID column. The source address field is set to 1,specifying a counter value of 1.

When RID descriptor 834 is forwarded to DMAC 140, it is initiallyprocessed by read descriptor parser logic block 121 b. Read descriptorparser logic block 121 b detects the RID flag, causing read descriptorparser logic block 121 b to notify a RID engine in one of the datamovement blocks (130 a, 130 b, 130 c, or 130 d) of receipt of a RIDdescriptor 834.

When the notified RID Engine receives the notification, the RID Enginegenerates RID column RID8 813 accordingly. Thus, RID column RID8 has acolumn width of two bytes, which includes 256 rows or elements. Thefirst RID in RID column RID8 is 1000, the RID starting value specifiedin auxiliary descriptor 833. Successive RIDs in RID column RID8 arecreated by incrementing the RID starting value by 1, the specifiedcounter value. The next two successive RIDs in RID column RID8 are thus1001 and 1002, respectively.

CID generation sub-chain 852 comprises one descriptor, HARE descriptor835. HARE engine 473 generates CID array CID8 818 when executing HAREdescriptor 835.

Core partitioning sub-chain 853 specifies how to perform the corepartitioning for key column KEY8, payload column PAY8, and RID columnRID8. Core partitioning sub-chain 453 includes core partitioningdescriptor 841, core partitioning descriptor 842, and core partitioningdescriptor 843. Core partitioning descriptor 841 is for partitioning keycolumn KEY8, and core partitioning descriptor 842 is for partitioningpayload column PAY8, and core partitioning descriptor 843 is forpartitioning RID column RID8.

Each of these partitioning descriptors identifies the respective columnto be partitioned among core processors as described before. Withrespect to core partitioning descriptor 843, the Source Addr fieldidentifies the RID column RID8 by referencing the column's address incolumn memory 474.

Each core partitioning descriptor specifies a destination address (i.e.in the Destination Addr. field) in DMEM. For each core partitioningdescriptor, the core processors in Data Movement System 101 have arespective column FIFO buffer in scratchpad memory at the destinationaddress, that is, for each core processor, there is a respective columnFIFO buffer for each of key column KEY8, payload column PAY8, and RIDcolumn RID8. These column FIFO buffers are row aligned.

For example, after processing HARE descriptor 835, assume the first fourelements in CID array CID8 contain the following CID's: 0, 6, 16, 0 inthe first four rows, which identify core processors 103 a, 103 g, 104 a,and 103 a, respectively. After processing core partitioning sub-chain853, the first and fourth rows of column KEY8, payload column PAY8, andRID column RID8 are stored contiguously in respective column FIFObuffers of core processor 103 a. In the column FIFO buffer for RIDcolumn RID8 in core processor 103 a, the first two elements contain thefirst and fourth RID entries 1000 and 1003, respectively, just as theserows did when stored in column memory 474 before partitioning.

RIDs for Other Tabular Data Manipulation Operations

Partitioning is one example of a tabular data manipulation operationthat alters row alignment when generating resultant columns. Another isa gather operation. In a gather operation, Data Movement System 101filters out rows of a column while the column is in flight from a sourcememory location to a destination memory location, and compacts theresulting rows of the column, (i.e. the rows that were not filtered out)while storing the resulting rows in the destination memory location suchthat the resulting rows are stored in consecutive memory locationswithin the destination memory even if the resulting rows were not storedin consecutive memory locations at the source memory location. The rowsmay be filtered out based on a bit vector. See Run Length Encoding AwareDirect Memory Access Filtering Engine For Scratchpad-Enabled Multi-CoreProcessors for a further description of the gather operation asperformed by Data Movement System 101.

According to an embodiment, a RID descriptor may specify a datamanipulation operation, such as a gather operation. Thus, afterperforming a data manipulation to a particular column moved to a memorysuch as DMEM of a core processor, a RID column is in effect manipulatedin the same way. The resultant manipulated column and RID column are rowaligned allowing the RIDs to be used for RID-based row resolution.

The data movement system may convert each RID within the list of RIDsfrom its logical RID to a corresponding physical RID prior to performinga gather and/or scatter operation. A logical RID, as described herein,is a unique identifier assigned to each row in a database table. Aphysical RID, as described herein, is derived from a logical RID. In anembodiment, the physical RID is derived by subtracting a base value fromthe logical RID. This ability to convert logical RIDs to physical RIDsallows a core processor to work on a smaller subset of rows of a columnof tabular data that are stored in contiguous addresses in main memory.Additionally, a core processor may initiate data movement with a gatheroperation using a subset of rows without first converting the logicalRIDs of the rows to their corresponding physical RIDs.

Generation of column RIDs by Data Movement System 101 has manyadvantages for many different types of database operations. One exampleof such an operation is a partitioned “filter and projection” databaseoperation. In a partitioned filter and projection operation, rows may bepartitioned between core processors so that a portion of the columns ofrows are evaluated in parallel against filtering criteria to determinewhich subset of rows satisfy the filtering criteria. The subset of rowsare then further processed. Such further processing include processing“carry” columns, which, in the context of the filtering portion are thepartitioned filter and projection operation, are the columns that arenot evaluated for the criteria.

One technique for performing a partitioned filter and projectionoperation is to partition the rows in their entirety and then examinethe column pertinent to the filtering. In this technique, the carriedcolumns are distributed to the scratchpad memory of core processors eventhough many of the “filtered out” rows of the carried columns are neverotherwise processed. If the filtering criteria is selective, thenpotentially substantial processing bandwidth is expended transferringdata that is not pertinent to the partitioned filter and projectionoperation.

With RIDs, only a subset of columns pertinent to the filtering criterianeed to be partitioned between core processors. The RIDs of rowssatisfying criteria may be used to obtain the rows from other columns.

For the purpose of identifying a subset of rows in a column, RIDs mayrequire less memory to identify a smaller subset than a bit vector. Abit vector (at least one that is uncompressed) occupies the same amountof memory to identify a subset of rows in a set of rows regardless ofthe number of rows in the subset. When the number of rows in the subsetis much smaller than that of the set, the bit vector is sparse, that is,only a small number of bits are set to identify rows. A list of RIDs mayoccupy less memory in this case than the bit vector.

A sparse bit vector may be used to generate a list of RIDs that occupiesless memory. A RID descriptor may specify to generate a RID column andapply a bit vector in a gather operation, thereby generating a RIDcolumn in a destination memory location, the RID column comprising RIDsthat identify the rows identified by the bit vector.

DMS Memory Organization

According to an embodiment of the present invention, DMS memorycomprises four categories of memory, each category being accessible toan engine (or engines) of DMAC 140 to store data read or written by thatengine. Each category may comprise one or more units of memory. Onecategory is used to store columns that are to be partitioned and/orserve as input for generating a hash column, another is used to storehash columns, another is used to store RID columns or bit vectors, andfinally another is used to store CIDs. These categories of memory andthe arrangement thereof with respect to various engines of the DMAC isdepicted in FIG. 9A and FIG. 9B.

Referring to FIG. 9A, it depicts column memory unit 474 a, column memoryunit 474 b, and column memory unit 474 c. Each of column memory unit 474a, and column memory unit 474 b, and column memory unit 474 c are usedto store columns that are partitioned and/or serve as input forgenerating a hash column.

DDR load engine 931 a, DDR load engine 931 b, DDR load engine 931 c, andDDR load engine 931 d are the DDR data load engines of data movementengine 130 a, data movement engine 130 b, data movement engine 130 c,and data movement engine 130 d, respectively. According to anembodiment, each of DDR load engine 931 a, 931 b, 931 c, and 931 d maymove a column from DDR memory to any of column memory units 474 a, 474b, and 474 c. The column is moved in response to receipt of controlinformation from read descriptor parser logic block 121 b. Readdescriptor parser logic block 121 b dispatches the control informationbased on a descriptor parsed by read descriptor parser logic block 121b, the descriptor specifying the source address of the column in DDRmemory and a destination column memory unit 474 a, 474 b, or 474 c, andthe destination address within destination column memory unit 474 a, 474b, or 474 c. Write access by DDR load engine 931 a, 931 b, 931 c, and931 d to any of column memory units 474 a, 474 b, and 474 c isarbitrated by arbitration unit 990 a.

HARE engine 474 accesses (via arbitration unit 990 b) any of columnmemory units 474 a, 474 b, or 474 c to read one or more key columns fromwhich to generate a hash column. Partition engine 472 accesses (viaarbitration unit 990 c) any of column memory units 474 a, 474 b, or 474c to read one or more columns therein to partition.

Referring to FIG. 9B, it depicts RID memory units 404 a, 404 b, 404 c,and 404 d. Each of RID memory units 404 a, 404 b, 404 c, and 404 dcomprise one or more memory units that are each used to store RIDcolumns or BVs. The RID columns may be loaded from DMEM to any of RIDmemory units 404 a, 404 b, 404 c, or 404 d. Also, each of the DDR loadengines have a RID Engine which can access the local RID memory thatresides in that data movement engine. Thus, RID memory units 404 a, 404b, 404 c, or 404 d can be used to store a RID column that is generatedaccording to a RID descriptor (e.g. RID descriptor 834), which specifieswhich of RID memory units 404 a, 404 b, 404 c, or 404 d to store the RIDcolumn. As described earlier, RID columns can also be stored in columnmemories 474 a, 474 b, and 474 c.

As mentioned before, data movement engine 130 a, 130 b, 130 c, and 130 deach include a DDR load engine, which are DDR load engine 931 a, 931 b,931 c, and 931 d, respectively. In addition, data movement engine 130 a,130 b, 130 c, and 130 d each include a DMEM load engine, which are DMEMload engine 941 a, 941 b, 941 c, and 941 d, respectively.

According to an embodiment in which an RID memory unit is internal to adata movement engine, the DDR load engine and DMEM load engine of eachdata movement engine may access only the respective RID memory unit toread and write a RID column. DDR load engine 931 a and DMEM load engine941 a have access to RID memory unit 404 a via arbitration unit 990 f,DDR load engine 931 b and DMEM load engine 941 b have access to RIDmemory unit 404 b via arbitration unit 990 g, DDR load engine 931 c andDMEM load engine 941 c have access to RID memory unit 404 c viaarbitration unit 990 h, DDR load engine 931 d and DMEM load engine 941 dhave access to RID memory unit 404 d via arbitration unit 990 i.

A data movement engine can only perform a gather and/or scatteroperation using a RID column or BV stored in the RID memory to which therespective DDR load engine and DMEM load engine have access. Forexample, in order for data movement engine 130 a to perform a gatheroperation using a RID column, the RID column should be stored in RIDmemory unit 404 a.

DMS-DMS Memory Movement

According to an embodiment, a data movement engine performs datamovement operations for only the group of core processors connected (viaa DMAD) to a particular DMAX. For example, data movement engine 130 aperforms data movement for core processors 103 a and 103 g and no othercore processor in data movement system 101, such as 104 a and 104 g.

Different data movements to different core processors may be performedby different data movement engines but can use the same RID column or BVto perform the data movement. To use the same RID column or BV, the RIDcolumn and/or BV is copied to the multiple RID memory units that areaccessible to the data movement engines performing the data movement.

One way to move copies of a RID column or BV to multiple RID memoryunits is to execute multiple descriptors, each specifying to move thesame RID column from DDR memory to a particular RID memory. However,this requires multiple movements from DDR memory to data movement system101.

To avoid multiple movements from DDR memory, data movement system 101 isconfigured to internally move data between various memory units in DMSmemory. Data movement performed in this way is referred to herein asinternal DMS memory movement. Internal DMS memory movement can beperformed more efficiently than data movements between main memory anddata movement system 101. Data movement system 101 may be configured toexecute internal DMS memory movement by submitting to data movementsystem 101 a DMS-DMS descriptor. A copy ring is used to perform internalDMS memory movement.

FIG. 10 shows copy ring 1000, which comprises digital electroniccircuitry configured for internal DMS memory movement. Copy ring 1000includes copy ring nodes, each of which are a block of digitalelectronic circuitry configured to participate in moving data to andfrom memory units within DMS memory and other copy ring nodes. Accordingto an embodiment, there are several kinds of copy ring nodes: a DMS copyengine node and copy memory interface node. Copy ring 1000 includes DMScopy engine 1011, and copy memory interface nodes 1012, 1013, 1014,1015, 1016, 1017, 1018, 1019, and 1020, one for each DMS memory unitthat serves as a source or destination for internal DMS memory movement.

DMS copy engine 1011 comprises digital electronic circuitry configuredto perform various functions that are hereafter described. In general,DMS copy engine 1011 initiates internal DMS memory movement in responseto receiving from read descriptor parser logic block 121 b controlinformation generated by read descriptor parser logic block 121 b for aDMS-DMS descriptor.

Each copy ring node is linked by a separate bus to each of two othercopy ring nodes, thereby forming a loop or ring along which data istransmitted between and among copy ring nodes. Each copy ring nodereceives control information and may receive “copy data” that wasretrieved from a DMS memory unit by another copy memory interface nodeand sent via a bus from another copy ring node. The term copy datarefers to data stored in a DMS memory unit that is copied to another DMSmemory unit using internal DMS memory movement.

Each of the copy memory interface nodes is coupled to a respective DMSmemory unit and is configured to write copy data to the respective DMSmemory unit and/or to read copy data from that DMS memory. In anotherembodiment, a copy memory interface node may be coupled to multiplememory units when such memory units are physically proximate to eachother.

According to an embodiment, the loop is directional. That is, a givencopy ring node is connected by two separate buses to two other copy ringnodes; one copy ring node (“source node”) from which the given copy ringnode receives control data and/or copy data, and another copy ring node(“destination node”) to which the given copy ring node forwards controldata and/or read data.

Referring to FIG. 10, copy memory interface node 1012, 1013, and 1014are copy memory interface nodes for column memories within DMS memory150. Copy memory interface node 1012, 1013, and 1014 are coupled tocolumn memory 474 a, 474 b, and 474 c, respectively. Copy memoryinterface node 1015 is coupled to hash column memory 475. Copy memoryinterface node 1016 is coupled to CID memory 476. Copy memory interfacenodes 1016, 1017, 1018, and 1019 are coupled to RID memory 404 a, 404 b,404 c, and 404 d, respectively.

The source and destination node of each copy ring node depicted in FIG.10 is indicated by directional lines representing a bus between copyrings nodes, with a line directed from a source node of a copy ring nodeto the copy ring node and a line directed from the copy ring node to thedestination node of the copy ring node. For example, the source anddestination node for copy memory interface node 1012 is DMS copy engine1011 and copy memory interface node 1013, respectively.

DMS-DMS Descriptor

As with other data movement operations described previously, adescriptor is used to configure Data Movement System 101 to perform aninternal DMS memory movement. FIG. 11 depicts DMS-DMS descriptor 1101,which is used to configure Data Movement System 101 to perform aninternal DMS memory movement.

Referring to FIG. 11, it depicts DMS-DMS descriptor 1101. The “DescType” field of DMS-DMS descriptor 1101 specifies DMS-DMS descriptor1101's descriptor type.

The “Src Addr” field specifies the source address of copy data.According to an embodiment, the source address should refer to a singlememory address space (“DMS memory address space”) that covers multipleDMS memory units. A range of the DMS memory address space is exclusivelydedicated to a single DMS memory unit, and an address within any DMSmemory unit falls within the respective dedicated range. Thus, eachmemory address of any column memory 474 a, 474 b, 474 c, hash columnmemory 475, CID memory 476, and RID memory 404 a, 404 b, 404 c, and 404d falls within a particular range, and is absolute within the DMS memoryaddress space.

“Dest Addr” field specifies the destination address within a DMS memoryunit to write copy data. For each DMS memory unit to which copy data iswritten for a DMS-DMS descriptor, the destination address is the same.Unlike the source address of “Srd Addr” field, the destination addressis relative to a particular DMS memory unit (e.g. an offset).

“Write Map” fields specifies into which DMS memory to write copy data.For example, Write Map may be a bit map, with each bit corresponding toone of column memory units 474 a, 474 b, 474 c, hash column memory unit475, CID memory unit 476, and RID memory units 404 a, 404 b, 404 c, and404 d.

“Column Width” indicates the size of the column of the copy data, “Rows”specifies the number of rows of the copy data.

Internal DMS Memory Movement

FIG. 12 is a flow chart depicting operations that copy ring 1000 in FIG.10 performs for internal DMS memory movement. The operations areperformed in response to submission of a DMS-DMS descriptor by a coreprocessor to a descriptor channel of the respective DMAD of the coreprocessor.

Referring to FIG. 12, at 1205, DMS copy engine 1011 receives controlinformation from read descriptor parser logic block 121 b. The controlinformation includes information specified in the DMS-DMS descriptor,including the source address, the destination address, and the writemap, as specified by the “Src Addr”, “Dest Addr”, and “Write Map”fields, respectively.

Operations 1210-1235 represent a loop comprising operations that areperformed by each copy ring node. In each iteration of the loop, asuccessive copy ring node performs the operations in the loop. DMS copyengine 1011 performs the initial iteration, and the operations of theloop are illustrated with DMS copy engines 1011's initial performance ofthe operations.

At 1210, the current copy ring node, which is DMS copy engine 1011,forwards control information to the destination node of the current copyring node, copy memory interface node 1012. In a latter iteration of theloop performed by another copy ring node, operation 1210 may also entailreceiving copy data. Copy data is received when in a previous iteration,copy data was read from a source DMS memory unit by a copy memoryinterface node (such as copy memory interface node 1012).

At 1215, the destination node, which is copy memory interface node 1012,receives control information, and copy data, if copy data is forwardedby the source node. Since DMS copy engine 1011 has not sent any copydate, only control information is received.

Upon receipt of control information and possible receipt of copy data,the destination node may simply forward control information/copy data tothe next copy ring node in the copy ring 1000. Forwarding the controlinformation/copy data in this way occurs when, in effect, the controlinformation indicates that there is no read or write for a destinationnode to perform. Specifically, if the source address does not identify amemory address located in the DMS memory unit of the destination nodeand the write map does not indicate to write copy data to the DMD memoryunit, or no copy data was forwarded from the source node along with thecontrol information, there is no read or write to DMS memory for adestination node to perform. The destination node becomes the sourcenode at 1210 and forwards control information/copy data to the nextdestination node.

Otherwise, one of two alternate sets of operations is performed inresponse to certain determinations as follows. First, at 1220, inresponse to a determination that the source address maps to the DMSmemory unit (“source DMS memory unit”) of the destination node, thedestination node reads the copy data at the source address.

Second, at 1225, in response to a determination that the write mapidentifies the DMS memory unit of the destination node, the destinationnode writes, to the respective DMS memory unit, the copy data received,the copy data being written to the destination address specified by“Dest Addr” of the DMS-DMS descriptor. At 1230, the write map in thecontrol data is set so that it no longer specifies to write copy data tothat destination node.

After performing either operation 1220 or 1230, the destination nodedetermines whether the write map specifies that the copy data is to bewritten to any DMS memory unit. If the determination is that write mapspecifies that copy data is to be written to any DMS memory unit, thenthe destination node becomes the source node at 1210 and transmitscontrol information and/copy data to the next destination node.Otherwise, the internal DMS memory movement ends.

A DMS-DMS descriptor may specify a source address for copy data for acopy ring node that is not the first in copy ring node 1000, i.e. is notcopy memory interface node 1012. In this case, only the controlinformation is forwarded from copy ring node to copy ring node until the“copy data source node” is reached, that is, until the copy memoryinterface node that handles the DMS memory unit that corresponds to thesource address is reached. The copy data source node reads the copy datafrom the respective DMS memory unit and forwards the copy data alongwith the control information to successive copy ring nodes.

It may be useful to shift data within a DMS memory unit. To accommodatethis scenario, the DMS memory unit is identified, in a DMS-DMSdescriptor, as both the source of copy data and a destination of copydata by the write map. The copy data is read from the source DMS memoryunit by the source copy memory interface node, which then writes thecopy data to the source DMS memory unit (which is also the destinationDMS memory unit) at the destination address.

In another useful scenario, multiple core processors may each generatespecific parts of a larger BV; each specific part is then distributedamong multiple RID memory units to generate a copy of the larger BV ineach of the multiple RID memory units. A copy of the BV may beefficiently assembled in each of the multiple of RID memory units usinginternal DMS memory movement. Each core processor may configure aDMS-DMS descriptor to load the respective BV part from the respectiveRID memory unit of the core processor into other RID memory units at adestination address corresponding to the respective BV part in thelarger BV. The destination address to use is different for each coreprocessor. Each core processor configures a DMS-DMS core processor tocopy the BV part at the destination address in other RID memory units.

Broadcasting Data to Multiple DMEM Units

According to an embodiment, each data movement engine 130 a, 130 b, 130c, and 130 d is connected via a corresponding DMAX to the DMEM units ofa separate set of core processors served by the DMAX, and, in responseto a single data descriptor that has a DMEM unit as a source ordestination of a data movement, can only move data to and from the DMEMsconnected to that DMAX. The set of core processors, the respective DMEMunits, and the database movement engine are referred to as being localto each other. The other data movement engines, other core processors inData Movement System 101 not in the set, and DMEM units of the othercore processors are referred herein to as being remote.

For example, data movement engine 130 a is connected by DMAX 110 a tolocal DMEM units 102 a and 102 g of local core processors 103 a and 103g. Data movement engine 130 a may only move, in response to a singledescriptor, data from main memory to either DMEM unit 102 a or 102 g.With respect to data movement engine 130 a, DMEM units 105 a and 105 gof core processors 104 a and 104 g are referred to as being remote.

According to an embodiment, each of data movement engine 130 a, 130 b,130 c, and 130 d, in response to a single descriptor with DMEM specifiedas the destination of the data movement, submitted by a local coreprocessor, moves data from a source memory to multiple DMEM units, whichmay be both local and remote with respect to the data movement engine.For example, core processor 103 a submits a data descriptor, which isprocessed by local data engine 130 a. The data descriptor specifies tomove data from main memory to multiple DMEM units, some of which arelocal to the data movement engine 130 a and some of which are remote. Inresponse, data movement engine 130 a processes the descriptor, movingdata from the source memory to the multiple DMEM units, as described infurther detail below. Moving data to multiple DMEM units in response toa single descriptor that specifies so is referred to herein as a DMEMbroadcast.

In a DMEM broadcast, data movement by a data movement engine to remoteDMEM units is accomplished through a copy ring having copy memoryinterface nodes that are each connected to a data movement engine. Sucha copy ring is depicted in FIG. 13.

Referring to FIG. 13, it depicts copy ring 1300. Like copy ring 1000,copy ring 1300 includes copy memory interface nodes. However, the copymemory interface nodes are each connected to a data movement engine andare each configured to write (or read) to circuitry of the data movementengine in response to control data and “broadcast data” transmitted overcopy ring 1300. Each copy ring node in copy ring 1300 is linked by busesto two other copy ring nodes, thereby forming a loop or ring along whichcontrol data and broadcast data is forwarded among successive copy ringnodes, as described earlier for copy ring 1000.

Copy ring 1300 comprises copy memory interface node 1312, 1313, 1314,and 1315, which are connected to data movement engine 130 a, datamovement engine 130 b, data movement engine 130 c, and data movementengine 130 d, respectively. DME copy engine 1311 comprises digitalelectronic circuitry configured to initiate transmission of control dataand broadcast data over copy ring 1300 in response to receiving controldata and broadcast data from a data movement engine 130.

A DMEM unit that is local to the data movement engine to which a copymemory interface node is connected is referred to as local with respectto the data movement engine. Thus, DMEM units 102 a and 102 g, which arelocal to data movement engine 130 a, are local to copy memory interfacenode 1312.

DMEM Broadcast Descriptors and Handling

Data descriptors that may specify to perform a DMEM broadcast arereferred to herein as DMEM broadcast descriptors. According to anembodiment, several types of data descriptors may be DMEM broadcastdescriptors.

A descriptor type that specifies to move data from DDR memory to DMEMmay specify to broadcast the data to one or more DMEM units. The DMEMunits to which to broadcast are identified by a DMEM map. Similar to awrite map, the DMEM map comprises a sequence of bits, each of which areassociated with a DMEM unit and may be set to broadcast data to the DMEMunit.

The data descriptor is submitted by a requesting core processor asdescribed previously for a data descriptor. The local data movementengine of the core processer retrieves the data from DDR memory andtransmits the data to the DMEM unit of the requesting core processor tobe written thereto.

The control information that is generated from the data descriptorincludes the DMEM map. If the data movement engine determines that theDMEM map identifies any DMEM unit local to the data movement engine, thedata movement engine treats data read from DDR memory as broadcast dataand transmits the broadcast data to any local DMEM unit identified bythe DMEM map.

If the data movement engine determines that the DMEM map identifies anyDME unit that is remote to the data movement engine, the data movementengine treats the data read from DDR memory as broadcast data andtransmits control data along with the broadcast data on copy ring 1300to the next copy ring node on the ring. For example, if DME 103 a wasthe local DME that received the data read from DDR, the copy ring nodeit is connected to, copy memory interface node 1312, places the controldata and the broadcast data on ring 1300, where it is transmitted tocopy memory interface node 1313.

The control data and broadcast data is forwarded along copy ring 1300between successive copy memory interface nodes 1313, 1314, and 1315similar to as described for copy ring 1000.

As each copy memory interface node receives the control data andbroadcast data, the copy memory interface node determines whether theDMEM map identifies a DMEM unit local to the copy memory interface node.If the DMEM map identifies a DMEM unit local to the copy memoryinterface node, the copy memory interface node writes control data andbroadcast data to the internal circuitry of the data movement engine.The data movement engine transmits the broadcast data to any local DMEMunit identified by the DMEM map to be written thereto.

Similar to the write map, when broadcast data is written to the internalcircuitry of a data movement engine, the respective copy memoryinterface node sets the DMEM map to indicate that broadcast data hasbeen forwarded to the DMEM unit. Thus, if after copy memory interfacenode sets the DMEM map the DMEM map indicates that there are no DMEMunits to which to forward broadcast data, copy memory interface nodeceases to transmit the broadcast data.

The data descriptor may also identify tabular data manipulationoperations (e.g. a scatter and a gather) to be performed. If the datamovement engine determines that control data specifies to perform atabular data manipulation operation, then a data movement engine movingbroadcast data may transform the broadcast data according to thedatabase operation and write broad cast data as transformed to a DMEMunit.

Not only may a data descriptor specify that the source of broadcast datais DDR memory, a data descriptor may specify the source of broadcastdata is a DMEM unit or DMS memory. The DMEM units to which to broadcastare identified by a DMEM map in the data descriptor.

The data descriptor is submitted by a requesting core processor asdescribed previously for a data descriptor. The local data movementengine of the core processer retrieves the broadcast data from the DMEMunit of the requesting core processor and transmits the control datagenerated for the data descriptor and the broadcast data on copy ring1300 to the next copy ring node on the ring as described previously.

The control data and broadcast data is transmitted to and processed byall copy memory interface nodes (1312, 1313, 1314, and 1315) similar toas described above.

Peripheral Access to Copy Ring

A copy ring similar to those described above may be used to access DMSmemory through a peripheral device. The peripheral device is connectedto a copy ring similar to copy ring 1000. For example, the peripheraldevice may be a debug controller connected to the DMS copy engine. Thedebug controller may transmit control data to the copy ring engine,which transmits the control data along the copy ring. The source addressspecifies the DMS memory unit from which to read data. The correspondingcopy memory interface node reads data from the DMS memory unit, andtransmits the data along the copy ring to the copy engine, which returnsthe data to the controller. Similarly, the control data can specify tocopy the data to other DMS memory units.

To broadcast data to multiple DMEM units, a copy ring similar to copyring 1300 may be used. The peripheral device sends control data alongwith broadcast data to the copy engine of a copy ring. The broadcastdata is propagated by the copy ring to the DMEM units specified in DMEMmap via the respective data movement engines. The peripheral device maybe connected to the copy engine in the DMS by a master of a SOC (“systemon a chip”) interconnect. The peripheral itself could be a networkinterface such as PCIe (Peripheral Component Interconnect Express) orEthernet. The control data may specify to perform tabular datamanipulation operations, which are performed by one or more databasemovement engines.

Extensions and Alternatives

In the foregoing specification, embodiments of the invention have beendescribed with reference to numerous specific details that may vary fromimplementation to implementation. Thus, the sole and exclusive indicatorof what is the invention, and is intended by the applicants to be theinvention, is the set of claims that issue from this application, in thespecific form in which such claims issue, including any subsequentcorrection. Any definitions expressly set forth herein for termscontained in such claims shall govern the meaning of such terms as usedin the claims. Hence, no limitation, element, property, feature,advantage or attribute that is not expressly recited in a claim shouldlimit the scope of such claim in any way. The specification and drawingsare, accordingly, to be regarded in an illustrative rather than arestrictive sense.

The invention claimed is:
 1. A method for generating row identifiers(RIDs) for one or more columns: storing a first descriptor at aparticular memory location, said first descriptor indicating: anattribute specifying to generate a RID column comprising a particularsequence of RIDs; a destination memory location for said RID column; inresponse to said particular memory location being pushed into a firstregister within a register space that is accessible by a first set ofelectronic circuits: said first set of electronic circuits accessingsaid first descriptor stored at said particular memory location; saidfirst set of electronic circuits generating an ordered sequence of RIDs;said first set of electronic circuits storing said RID column at saiddestination memory location, said particular sequence of RIDs in saidRID column including at least a portion of said ordered sequence ofRIDs.
 2. The method of claim 1, wherein said first descriptor specifiesa counter value specifying a difference between successive RIDs in saidordered sequence of RIDs.
 3. The method of claim 1, wherein said firstdescriptor specifies a column width for said RID column.
 4. The methodof claim 1, wherein generating said ordered sequence of RIDs includesgenerating said ordered sequence of RIDs beginning with a startingvalue.
 5. The method of claim 4, further including: storing a seconddescriptor at another memory location, said second descriptor indicatingsaid starting value; and in response to said another memory locationbeing pushed into said first register within a first register space thatis accessible by said first set of electronic circuits: configuring saidfirst set of electronic circuits to generate said ordered sequence ofRIDs beginning with said starting value.
 6. The method of claim 5,wherein configuring said first set of electronic circuits includessetting a particular register to a value based on said starting value,said particular register being identified by said second descriptor. 7.The method of claim 4, wherein said first descriptor specifies saidstarting value.
 8. The method of claim 1, wherein said first descriptorspecifies a tabular data manipulation operation, wherein the methodfurther includes applying said tabular data manipulation operation tosaid ordered sequence of RIDs to generate said RID column stored at saiddestination memory location.
 9. The method of claim 8, wherein saidtabular data manipulation operation is a gather operation based on a bitvector.
 10. The method of claim 8, further including performing rowresolution using said RID column stored at said destination memorylocation on a second column.
 11. The method of claim 8, furtherincluding: storing a second descriptor at another memory location,wherein said second descriptor specifies: a source memory location for asecond column; a second destination memory location; said datamanipulation operation; in response to said another memory locationbeing pushed into said first register within a first register space thatis accessible by said first set of electronic circuits, said first setof electronic circuits: applying data manipulation operation to a columnstored at second source memory location; and storing a resultant columnresulting from said applying said data manipulation operation at saidsecond destination memory location.
 12. A method, comprising: storing afirst descriptor at a first descriptor memory location, said firstdescriptor indicating: an attribute specifying to generate a RID columncomprising an ordered sequence of RIDs; a first destination memorylocation for said RID column; in response to the first descriptor memorylocation being pushed into a register within a register space that isaccessible by a first set of electronic circuits, said first set ofelectronic circuits generating and storing said RID column at said firstdestination memory location; storing each core partitioning descriptorof a set of core partitioning descriptors in a respective descriptormemory location; wherein each core partitioning descriptor of said setof core partitioning descriptors specifies a respective source memorylocation of a respective column wherein the respective source memorylocation specified by a certain core partitioning descriptor of said setof core partition descriptors is the first destination memory locationof said RID column; in response to each respective descriptor memorylocation of the set of core partitioning descriptors being pushed into aregister within a register space that is accessible by a first set ofelectronic circuits: for each core partitioning descriptor of said setof core partitioning descriptors, partitioning the respective column ofsaid core partitioning descriptor between scratch pad memories of coreprocessors that are each coupled to said first set of electroniccircuits.
 13. The method of claim 12, wherein for said certain corepartitioning descriptor of said set of core partitioning descriptors,partitioning the respective column includes storing a resultant RIDcolumn in a particular core processor of said core processors, saidresultant RID column comprising a portion of said ordered sequence ofRIDs, wherein the method further includes performing row resolutionagainst another column based on said resultant RID column.
 14. Themethod of claim 12, wherein said first descriptor specifies a countervalue specifying a difference between successive RIDs in said orderedsequence of RIDs.
 15. The method of claim 12, wherein said firstdescriptor specifies a column width for said RID column.
 16. The methodof claim 12, wherein generating and storing said RID column includesgenerating said ordered sequence of RIDs beginning with a starting valuespecified in a descriptor.
 17. A chip comprising electronic circuitrybeing configured for generating row identifiers (RIDs) for one or morecolumns, said electronic circuitry being configured for: storing a firstdescriptor at a particular memory location, said first descriptorindicating: an attribute specifying to generate a RID column comprisinga particular sequence of RIDs; a destination memory location for saidRID column; in response to said particular memory location being pushedinto a first register within a register space that is accessible by afirst set of electronic circuits: said first set of electronic circuitsaccessing said first descriptor stored at said particular memorylocation; said first set of electronic circuits generating an orderedsequence of RIDs; said first set of electronic circuits storing said RIDcolumn at said destination memory location, said particular sequence ofRIDs in said RID column including a least a portion of said orderedsequence of RIDs.
 18. The chip of claim 17, wherein said firstdescriptor specifies a counter value specifying a difference betweensuccessive RIDs in said ordered sequence of RIDs.
 19. A chip comprisingelectronic circuitry configured for: storing a first descriptor at afirst descriptor memory location, said first descriptor indicating: anattribute specifying to generate a RID column comprising an orderedsequence of RIDs; a first destination memory location for said RIDcolumn; in response to the first descriptor memory location being pushedinto a register within a register space that is accessible by a firstset of electronic circuits, said first set of electronic circuitsgenerating and storing said RID column at said first destination memorylocation; storing each core partitioning descriptor of a set of corepartitioning descriptors in a respective descriptor memory location;wherein each core partitioning descriptor of said set of corepartitioning descriptors specifies a respective source memory locationof a respective column wherein the respective source memory locationspecified by a certain core partitioning descriptor of said set of corepartition descriptors is the first destination memory location of saidRID column; in response to each respective descriptor memory location ofthe set of core partitioning descriptors being pushed into a registerwithin a register space that is accessible by a first set of electroniccircuits: for each core partitioning descriptor of said set of corepartitioning descriptors, partitioning the respective column of saidcore partitioning descriptor between scratch pad memories of coreprocessors that are each coupled to said first set of electroniccircuits.
 20. The chip of claim 19, wherein for said certain corepartitioning descriptor of said set of core partitioning descriptors,partitioning the respective column includes storing a resultant RIDcolumn in a particular core processor of said core processors, saidresultant RID column comprising a portion of said ordered sequence ofRIDs, wherein the electronic circuitry is further configured forperforming row resolution against another column based on said resultantRID column.